Home
Username:
Password:
Microsoft Visual Studio .NET Tutorials

System Requirements and Installation / Writing Code in the Event Handler

Subtitles of the Movie

For this application, what we're going to do is have it checked to see whether the user has entered the correct name, and we simply have decided that the correct name is going to be Jim. If the user has entered the correct name, the application will say Welcome, if the user has not entered the correct name, it will say, basically that's not the right name. Now we can do this by using the if, then, else and end if structure. It's a programming structure if the user has done the correct thing, we run some code for that response. If the user has not done the correct thing, then we run some code for that response. In each particular part of this structure separate pieces of code will run, but only if the condition that's being applies, so we would write if box 1 text property equals Jim then label 2 text property equals welcome Jim. for the case in which it is not Jim we start off with an else go back to the label 2 property and say your not Jim, try again and it ends up with an end if. Notice that I made an error in the last line, when I did Visual Studio Source code editor which is what we are writing our code in tried to correct my error, it was having difficulty so it put a squiggly blue line beneath the code to notify me there is a problem. That's one of the advantages of using the Source code editor in Visual Studio. You can still program using Note Pad or some basic text editor, but you don't get the nice coloration and code writting help that Visual Studio .NET source code editor provides.

Tutorial Information

Course: Microsoft Visual Studio .NET
Author: Dave Mercer
SKU: 33420
ISBN: 1932072276
Release Date: 2003-04-01
Duration: 7 hrs / 101 lessons
Work Files: Yes
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available