Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

 

        Me.Text = "Type your question in the first field, then t or f for the answer in the second field."

 

        If Not My.Computer.FileSystem.FileExists(strXMLFilename) Then

 

            Dim sw As StreamWriter

            sw = New StreamWriter(strXMLFilename)

            sw.WriteLine("<?xml version=""1.0"" encoding=""ISO-8859-1""?>")

            sw.WriteLine("<quiz></quiz>")

            sw.Close()

 

        Else

 

            MsgBox("The file " & strXMLFilename & " is already on the disk drive. Click OK if you want to add more questions to that quiz. Or if you want to start a brand new quiz, click the Exit button to shut down this program, rename the quiz.xml file on the hard drive, then restart this program.")

 

        End If

 

        doc = New XmlDocument()

        doc.Load(strXMLFilename)

 

    End Sub