1. Home
  2. Computing & Technology
  3. Visual Basic

Chapter 4 - Working With Menus and Dialog Boxes - Part 3

By , About.com Guide

8 of 10

Notes about the Solution Code - Page 3

There are three places where something that you might think of as "cheater" code can be found. First ....

~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Form1_Load( _
  ByVal sender As System.Object, _
  ByVal e As System.EventArgs) _
  Handles MyBase.Load
  Button3_Click(sender, e)
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~

When the program starts up, it's often necessary to write some program code to "set up" the program in a state that is ready for first use. The Load event of the main entry form is a common place to put this code. In this case, however, there is code in the Click event of Button3.

What's Button3 you ask? A-Hah! Now you're starting to understand why we give objects meaningful names!

Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Working With Menus and Dialog Boxes - Part 3

©2009 About.com, a part of The New York Times Company.

All rights reserved.