1. Home
  2. Computing & Technology
  3. Visual Basic
Writing the Lucky Seven Code
Finding the Event Subroutines
 Join the Discussion
Log into the About VB Forum Here!
 
 Elsewhere on the Web
• Advanced!
Passing Parameters to VB.NET Event Subroutines

 

After the User Interface (sometimes called the GUI for Graphical User Interface) has been designed and built using Visual Studio, the actual code writing starts on page 49. The instructions start with, "Double-click the End button on the form. After a few moments, the Code Editor appears ..."

In the previous lesson, I suggested that you right-click the form to view the code associated with the form, which will include all of the subroutines for objects in the form - such as the End button. This is a good time to point out that virtually everything in Visual Studio can be done in several alternative ways.

If you wanted to create a Click event subroutine (or any other event subroutine), you could use the technique shown below:

Event Subroutines

Note that Button1 is selected in the left drop down list and Click is about to be selected in the right one. This is how any of the event subroutines listed for each object can be added to your project. Double-clicking an object, the method described in the book, will open a "default" event subroutines - which is usually the one you want in for most objects.

There is an interesting way that the Lucky Seven program can be extended. But before reading about it, you should actually complete the code in Chapter 2 so it will be easier to understand.

--please complete chapter 2 now-----

Next page >>>   More Uses For Lucky Seven Code > Page 1, 2, 3
Explore Visual Basic
By Category
About.com Special Features

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

Easy ways to connect two computers for networking purposes. More >

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

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

All rights reserved.