Adding events in visual basic , Visual Basic Programming

Adding Events in VB 

For adding the events in VB, first double click on the command button with the caption hello.

The Private Sub command1_Click () and End Sub would be inserted. Now type your coding within this construct.

Text1.Text = "Hello"

Private Sub command1_Click()

Text1.Text = "Hello"

With Text1

Font="Times New Roman"

.FontSize = 24

End With

End Sub

The With command relates the properties that follow with the control. (In this situation Text1).This is equivalent to the writing Text1.Font, Text1.FontSize. Double click on the command button with caption clear. And type the following code.

Private Sub command2_Click()

Text1.Text = " "

End Sub

Double click on the command button with the caption exit.

Now type the following code.

Private Sub command3_Click()

end

End Sub

This project has formed the form in show in the given figure with a textbox and 3 command buttons. The buttons have been related with the click events.

1858_command buttons.png

Figure: A Form with Command Buttons, Text Box and Accelator

Posted Date: 10/9/2012 8:05:05 AM | Location : United States







Related Discussions:- Adding events in visual basic , Assignment Help, Ask Question on Adding events in visual basic , Get Answer, Expert's Help, Adding events in visual basic Discussions

Write discussion on Adding events in visual basic
Your posts are moderated
Related Questions
DYNAMIC LINK LIBRARY   The dynamic link library (dll) permits one copy of a function to be shared among some parallel executing programs. The dll is a file that contains a num

Graphics Device Interface - GDI:   The GDI is a windows API. The GDI uses a set of generic graphics objects to draw to the screen, to the memory and printers. Therefore the p

Benefits of Using DLLs: The dynamic linking has the following advantages which are as shown below: It saves memory and decreases the swapping. Many processes can use a s


Input Box: To demonstrate the use of the Input Box as shown in figure. Now consider the illustration shown below: 1. Initiate a new project 2. Select the standard exe

VISUAL INTERFACE DESIGN Instead of the graphic nature of the program, only the visualness of the inter action is important. The program must not focus on the GUI. On the other

Case: Design a web page that contains the VBScript utilized for calculating subtotals, taxes, discounts & totals as well as code utilized to validate use

Shopping Cart Purpose – Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for al

Check Box: The check box control takes the value as on or off or grayed. The grayed one is neither on nor off. The user can transform the setting of the grayed check box.

Ask question #Minimum 10Public Class Form1 ''=============================================== ''Date: June 24, 2014 ''Author: Xochitl Nisbet ''Purpose: Convert Celsi