English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Please give an example if possible. Thank you.

2007-02-06 05:35:16 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

1) Double click the button.

You will see an event procedure that says something like:

Private Sub Command1_Click()


End Sub


That is where the event code goes. Put whatever you want to have happen between the Private Sub and End Sub lines.

If you have another procedure you want called, you can do it as follows:

Private Sub Command1_Click()

CALL LOADMENU()

End Sub
(notice the line in CAPS)

2007-02-06 05:43:18 · answer #1 · answered by Richard H 7 · 2 0

Double click on the button from the form designer and it will open the code for the on_click event of that particular button. Type your code in that space and that's what will fire when that button is clicked.

For example, double click on a button and put
alert("Hello world")
in the code window that opens in the on_click sub area. This will open an alert box that says "Hello world" when you click on that button.

2007-02-06 05:45:27 · answer #2 · answered by Anonymous · 0 0

single Button ----------------------- inner maximum Sub Button1_Click(ByVal sender As device.merchandise, ByVal e As device.EventArgs) Handles Button1.click Text1.text cloth = "Your text cloth right here" end Sub For extra suitable than one Button --------------------------------------... inner maximum Sub Button1_Click(ByVal sender As device.merchandise, ByVal e As device.EventArgs) Handles Button1.click, Button2.click Text1.text cloth = "Your text cloth right here" end Sub

2016-10-01 12:45:37 · answer #3 · answered by Anonymous · 0 0

use a Call Statement to call the procedure you want to execute. or write the procedure in the [button_name]_OnClick() event.

2007-02-06 05:42:36 · answer #4 · answered by MrLobito 2 · 0 0

fedest.com, questions and answers