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

You can exit a Do...Loop using the Exit Do statement. Since usually you desire to exit only in certain situations, such as to ignore an endless loop, you should employ the Exit Do

The user has to enter a starting balance, the dollar amount of deposits, and the dollar amount of withdrawals. the program then has to calculate the balance

write a XML with database with book details( book id, author ,subject, published year, vendor,price, language )

This section will discuss the fundamentals of VBScript and define concepts such as datatypes, loops and others. VBScript Data Types VBScript contain only one data type called

CONTEXT-SENSITIVE HELP   The Context-sensitive help gives online help for the circumstances which is associated with that state. The Context-sensitive help can be implemented

'This program compares interest rates between two banks and determines the best bank PublicClassForm1 PrivateSub Button1_Click(sender AsSystem.Object, e AsSystem.EventArgs) H

Describe different validation controls of VB.net?

Question 1 Design a form based applications using labels, text boxes, and buttons to perform basic arithmetic operations on integers Question 2 Describe the concept of Except

For naming anything variable names follow the standard rules in VBScript. A variable name: Should begin with an alphabetic character. Cannot have an embedded period. Sh