Jes|er
Aug 7th, 2002, 08:06 PM
I have two problems first Im trying to load a new form that tells the user that the file is not yet saved and asks them if they'd like to save the file.
How do I return to the last event if they say no?
Private Sub btnYes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnYes.Click
'Yes Save the file
Save()
Me.Close()
End Sub
Private Sub btnNo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNo.Click
'No Dont save the file
End Sub
Second when I use this in the main form the txtTextBox.SaveFile is underlined with an error about it not being part of the windows.forms.textbox namespace.
Public Sub Save()
If strFilename = "" Then
SaveFileDialog1.ShowDialog()
strFilename = SaveFileDialog1.FileName
End If
'txtTextBox.SaveFile is underlined below:
txtTextBox.SaveFile(strFilename & ".txt")
Any Ideas?
How do I return to the last event if they say no?
Private Sub btnYes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnYes.Click
'Yes Save the file
Save()
Me.Close()
End Sub
Private Sub btnNo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNo.Click
'No Dont save the file
End Sub
Second when I use this in the main form the txtTextBox.SaveFile is underlined with an error about it not being part of the windows.forms.textbox namespace.
Public Sub Save()
If strFilename = "" Then
SaveFileDialog1.ShowDialog()
strFilename = SaveFileDialog1.FileName
End If
'txtTextBox.SaveFile is underlined below:
txtTextBox.SaveFile(strFilename & ".txt")
Any Ideas?