Results 1 to 5 of 5

Thread: Form and code help.

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Location
    Colorado
    Posts
    83

    Form and code help.

    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?

    Code:
      
        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.


    Code:
    Public Sub Save()
    
            If strFilename = "" Then
                SaveFileDialog1.ShowDialog()
                strFilename = SaveFileDialog1.FileName
            End If
    
            
            'txtTextBox.SaveFile is underlined below:       
            txtTextBox.SaveFile(strFilename & ".txt")
    Any Ideas?
    Last edited by Jes|er; Aug 7th, 2002 at 08:57 PM.
    12/32/84 - I need some code to make me a sandwhich.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width