Results 1 to 4 of 4

Thread: Form1_Unload ..help please?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    colorado
    Posts
    17

    Form1_Unload ..help please?

    this annoys me.. i go through my program and build it but forget to tell it when it unloads it should end the program so i go back through all my forms to add it in.

    in VB6 there was this drop-down list of commands it could do (click, dblclick, etc) but in .NET there isn't, at least not in the same place

    so when i double click the form to open up the command and retype _Load to _Unload it still thinks it as unloading

    help?

  2. #2
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152

    is this what you wanted ?

    Code:
    Private Sub Settings_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    
    
    'Your unloading code here 
    
        End Sub

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The name of the event handler method doesn't matter like it did in VB6, its the Handles MyBase.Closing (or whatever event) that marks a method as an event handler. It also must match the method signature.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    In the editor , you'll find two comboboxes . On the left "Class Name" , there where you select your control or object . The right one is named "Method Name" , select events you want to work with .

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