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
Would it be possible to see an example of an array program that tracks rent in different apartment buildings and is modular?

Select Case: The Select Case is used for handling the multiple paths. The Select Case computes the expression and depending on the value of the equivalent Case statement execu

Message Box: The Message Box can be specified a title as shown in figure to specify the title for the message box follow by the command given below:  Private Sub Command1_C

A Sub procedure is a series of VBScript statements, enclosed through Sub & End Sub statements which perform actions however don't return a value. A Sub procedure can take arguments

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


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

Visual Interface  Based On Visual Patterns: The visual user interface should create recognizable patterns and text will be used for differentiating the objects with similar pa

i want to print number following pattern 1 12 123 1234