Click to See Complete Forum and Search --> : Button Mouse Click Event


Btang11111
February 26th, 2000, 08:30 PM
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.

Cakkie
February 27th, 2000, 07:31 AM
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
slisse@planetinternet.be

The best way to escape a problem, is to solve it.