Download presentation
Presentation is loading. Please wait.
Published byMartin Hart Modified over 8 years ago
1
Visual Basic A Quick Tutorial VB Review for ACS 367
2
Let’s look at the New project screen. New Tab Standard.exe Click Open
3
Main Window Tool Box Form Window Properties Window Project Explorer Window Caption, Min, Max
4
Tool Box Can you tell what each icon represents? The ones most used will be Labels, textboxes, command buttons and image box. Use labels if users do not change the information and text boxes if they do.
5
Project Explorer Window tells you all the forms, data environments and modules that you have in a project.
6
Properties Window For every object, you can set its properties directly through this window at design time rather than having to write code.
7
Objects Name Property VB gives every object a default name such as “label1” or “text1”. To be able to work more efficiently, we need to change the name so that it has meaning. Since we have different kinds of objects, we use a set prefix to distinguish that type of object. Only letters, numbers, and underscores are allowed for names.
8
Save a project. When you save a project, you must save the form and save the project. If you do not save both of them, you will have a form with no way to open it or a project that is empty.
9
Use the A icon and add a label to your form. Look at the Caption and the Name properties The name would be something like “lblLastName” (no spaces) but the caption can be anything like “Last Name:”
10
Adding an image Double Click the image tool – images are sizeable, pics aren’t This action adds a box and Then we will designate in the properties box what image to insert.
11
Adding a Command Button Double Click the Command Icon Set the Name to cmdExit Set the Caption to E&xit If you type an ampersand in front of the X, it will give the user keyboard access.
12
To make a command button such as Calculate or Exit or Clear the default button, simply click that button and set the Default property to true.
13
Write code for the Exit button. Double click the Exit button and the SCRIPT window will open. Notice the object (cmdExit) and the event procedure (click)
14
All the events available for the command button can be found here. Type in the word end. The proper format is to tab in for readability.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.