|
-
February 26th, 2000, 09:30 PM
#1
Button Mouse Click Event
Hi,
Can two Forms (Form1 & Form2 with Command1 & Command2 BUTTONS on each Form) be set to display (visible) at same time, & to enable EITHER of the two buttons be clicked thus firing Command1_Click () / Command2_Click () ?? Or must one be set to have the focus? Doesnt moving the mouse over the buttons & clicking the mouse automatically gives the button covered the focus?
Also, is there corresponding Registry ACTIVEX API functions to the Webbrowser Control Events module, ie without using Webbrowser Event Control package?
Please provide brief sample codes if possible.
-
February 27th, 2000, 08:31 AM
#2
Re: Button Mouse Click Event
Correct me if i'm wrong, but do you want like on start-up to have the two forms visible, and then fire one of the buttons event? If so, this code should do the trick.
'place this code wherever you want it to happen that the two form get visible
' I placed it in the form load of the 1st form
'this is form 1
private sub form_load()
form2.load
' this loads the form
' note: this will trigger the form_load event of the 2nd form
form2.visible = true
' shows the form
' to click a button
' if the button is on the form itself, then you can omit the refference to the form
form1.command1_click
form1.command2_click
form2.command1_click
form2.command2_click
' this will act like a user pressed the 4 butons on the two forms
end sub
Tom Cannaerts
[email protected]
The best way to escape a problem, is to solve it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|