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
Variant Type: If no data type is related with the VB variables, it takes the default variant type. The variable x will be of the variant type when the two declarations below a

ToolTip: The ToolTip property is used to flash a message regarding a control object when the mouse pointer moves over that object for a couple of seconds. Pick a control and c

I would like to know how to deploy a VB.NET Application using SQL SERVER as a back-end database

The Dictionary object stores data as key, item pairs. A Dictionary object is the corresponding of a PERL associative array. Items, that can be any form of data, are stored in the a

Each piece of data is passed in your process using an argument. Arguments serve like placeholders for the data you wish to pass into your process. You can name your arguments along

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

Files in a SDI and MDI Application: Both the SDI and MDI projects have 4 implementation files (.cpp extension). These are the files equivalent to the Document Class, View Clas

steps of connecting database from vb6.0


to dial a person''s 10 digit number and assign it to their name