[2005] Wait For Mouse Click?
Say I have a form that has a webbrowser on it, a text box and a command button.
When I click the command button, I want to wait until the user clicks in to a field on the webbrowser control. I can then return the name of the field selected back to the textbox on the form.
What's the best way to approach this? API? Events? I'm not really sure where to start and would really appreciate it if someone could point me in the right direction.
Thanks
Re: [2005] Wait For Mouse Click?
You just need to handle the click event for whatever field you are waiting for the click.
For example if the user click on a listbox you can do this:
Code:
Private Sub ListBox1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseClick
TextBox1.Text = ListBox1.Name
End Sub
I think this is what you are after, correct me if i'm wrong.
Re: [2005] Wait For Mouse Click?
Quote:
Originally Posted by cameron2
You just need to handle the click event for whatever field you are waiting for the click.
For example if the user click on a listbox you can do this:
Code:
Private Sub ListBox1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseClick
TextBox1.Text = ListBox1.Name
End Sub
I think this is what you are after, correct me if i'm wrong.
Not exactly.
What I want to do is fill in the name of a given HTML Element in to a text box.
So you click a button and execution pauses until somebody clicks the webbrowser control and an element inside of it.