Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

[Home][What's New][About][How To][Q&A Forum][Tutorials][Standards][Articles][Links][Contact Page][Mail Us][Guest Book][Join][Copyright][Privacy Statement][Disclaimer][DigitalSA]



Google
The Sequence of Events

Driven by Events
Visual Basic is an "event driven" language. What this means is that your coding will be performed in the sequence that the events occur, as opposed to the order in which it appears in your form module. It is therefore very important, if you want to create quality applications, to know which events will happen when.


Start Up and Shut Down Events
The most logical place to start would be the 6 events that occur when the form loads up and the 3 events that occur when the form shuts down.
They are, in this sequence:

Start Up:
  • Form_Initialize
  • Form_Load
  • Form_Resize
  • Form_Activate
  • Form_GotFocus
  • Form_Paint
  • Shut Down:
  • Form_QueryUnload
  • Form_Unload
  • Form_Terminate


  • This is what happens most of the time. You know, with a normal form in a little demo program. In many real life situations, things can be very different. Read on.

    Let's look at the three shut down events:

    The Other Events
    Although starting up and shutting down are by far the most common event sequences, there are several other very important combinations of events to take note of, as listed delicately below:

    Clicking on a Form: Double Clicking on a Form: Pressing a Key on a Form Minimizing then Restoring a Form: Calling a Message box from a Form Dragging something onto a Form
    ThisArticle_Terminate Event
    There are of course many more combinations of events that you and your form may experience, but I believe that the most common ones had been covered here. If this article triggers enough question and request events, I might just write a follow up.



    Back to Articles Page

    [Home][What's New][About][How To][Q&A Forum][Tutorials][Standards][Articles][Links][Contact Page][Mail Us][Guest Book][Join][Copyright][Privacy Statement][Disclaimer][DigitalSA]


    Shrog mailing list. Enter email address:

    © Copyright 2000 by Robert Terblanche (Robert@Shrog.iwarp.com). All rights reserved. For more info see our Copyright Statement.

    All information on this site is used at your own risk. For more details see our Disclaimer Statement.



    Beta