I have a problem loading a file from the Menu item. In fact I just
copied from another program where it works.
Private Sub toolStripMenuIt emLoadSession_C lick(ByVal sender As
Object, ByVal e As EventArgs) Handles
toolStripMenuIt emLoadSession.C lick
Try
Dim fi As New FileInfo(Applic ation.Executabl ePath)
openFileDialogD ump.InitialDire ctory = fi.DirectoryNam e
openFileDialogD ump.AddExtensio n = True
openFileDialogD ump.DefaultExt = "xml"
openFileDialogD ump.FileName = "UserSession.xm l"
Dim dr As DialogResult = openFileDialogD ump.ShowDialog( Me)
If dr = System.Windows. Forms.DialogRes ult.OK Then
Me.myUser.Predi cates.loadSetti ngs(openFileDia logDump.FileNam e)
End If
Catch ex As Exception
Me.richTextBoxO utput.Text += ex.Message &
Environment.New Line
End Try
End Sub
I get the error that openFileDialogD ump does not exist. Any ideas?
K.
copied from another program where it works.
Private Sub toolStripMenuIt emLoadSession_C lick(ByVal sender As
Object, ByVal e As EventArgs) Handles
toolStripMenuIt emLoadSession.C lick
Try
Dim fi As New FileInfo(Applic ation.Executabl ePath)
openFileDialogD ump.InitialDire ctory = fi.DirectoryNam e
openFileDialogD ump.AddExtensio n = True
openFileDialogD ump.DefaultExt = "xml"
openFileDialogD ump.FileName = "UserSession.xm l"
Dim dr As DialogResult = openFileDialogD ump.ShowDialog( Me)
If dr = System.Windows. Forms.DialogRes ult.OK Then
Me.myUser.Predi cates.loadSetti ngs(openFileDia logDump.FileNam e)
End If
Catch ex As Exception
Me.richTextBoxO utput.Text += ex.Message &
Environment.New Line
End Try
End Sub
I get the error that openFileDialogD ump does not exist. Any ideas?
K.
Comment