locked
Sequence of Form Events RRS feed

  • Question

  • Hi there,

     

    In VB 6 we use to have this sequence of form events:

     

    Initialize
    Load
    Resize
    Activate
    GotFocus
    Paint

     

    Now, on VB.NET 2005, if I try to use the Form.Initialize Event I get this error:

     

    Error 1 Event 'Initialize' cannot be found. 

     

    I see there is no Activate either...

     

    So, what is the correct Windows Forms sequence of events.

     

    I'm also lookin for a tutorial that explains the difference between the windows forms events and when to use each of them...

     

    Thanks!


     

     

     

    Monday, April 7, 2008 9:13 PM

Answers

  • Initialize is no longer needed as the Class constructor is now accesible in VB.NET.

     

    Activated is available, it has a 'D' (past tense), so check if applicable.

     

    Except for Load and Closed, you shouldn't rely on events firing in specific order.

    Monday, April 7, 2008 10:17 PM