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
how do i create a change calculator that gives the denominations of coins for an amount of change up to .99 cents

Write an event procedure to automate the billing system of a supermarket. Give the details of database tables, forms, controls and menu design (if any). Make assumptions, wherever


Creation of the Menu in VB 1. Initiate a new project by choosing a file and then new project. 2. Now select the Standard EXE as the Project type. 3. Build the Form1 activ


I need assistance with writing the Tryparse I have 98% of the assignment done.

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

DOCUMENT VIEW ARCHITECTURE The Document/View architecture is used to build an application based on the Microsoft Foundation Classes library. The Document/View architecture is s

INTRODUCTION TO GUI DESIGN AND FILE HANDLING   The aim of the user interface design is to attain the user's goals. When the user's goals are met, the user is satisfied and the