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
Deleting Handlers With Class Wizard: The handler can be deleted by using the class wizard. The class wizard will delete the prototype and message map entry. The user should ma

I''m trying to create a program in VB.net that will basically load the page within itself and allow you to input data via the program rather than going to the actual site using you

Returns or sets a numeric value indicating an error. Number is the Err object's default property. While returning user-defined error from an Automation object, set Err.Number throu

VBScript Operators VBScript contain a full range of operators, including comparison operators, arithmetic operators, concatenation operators, and logical operators.

Earlier versions of VBScript had no mechanism for making user-defined constants. Constants, if utilized, were implemented as variables & distinguished from other variables by using

For this assignment you have to design and implement a VB.NET project which prepares a bill of payment due, given the purchase amount. The project models a typical purchase transac

Write Visual Basic programs for the following: 1.     Write a program that uses a "For Loop" to generate a list of temperature conversions in one degree increments from a given

PROJECT TO CREATE SPLITTER WINDOW   1. Generate the SDI application. 2. Enlarge the class tab page. 3. Select the view class. 4. On right clicking the menu pops up.

HOW TO SOLVE ORDINARY DIFFERENTIAL EQUETION IN VISUAL BASIC PROGRAMMING