Events |
|
Tips >> Visual Basic | |
MAKE WEB APPLICATION WITHOUT KNOWLEDGE OF CODING? CLICK HERE
An event occurs in response to an action, such as the user clicking the mouse or pressing a key in the application. An event handler is a routine that responds to the event. At the top of the code Window in Visual Basic, there are two drop-down lists. The first list relates to the controls used in the form (including the
form), The following example illustrates events by using the MouseMove event for a CommandButton. The MouseMove event occurs before the Click event, so we can use this to move the CommandButton before the user gets a chance to click on it. As they try to click on it, the cmdCash CommandButton is moved around the screen. To try the example, set up a form as shown below with a Label, and two CommandButtons. Name one of the CommandButtons "cmdQuit", and the other "cmdCash". Set the TabStop property of the cmdCash CommandButton to False. Right-click on the cmdCash CommandButton and select "Bring To Front", to ensure it doesn't go behind the cmdQuit CommandButton when it's moved. |
|
|
|
|
Terms and Conditions / Privacy Policy / Refund Policy / Shipping Policy