|
-
Apr 13th, 2008, 04:45 AM
#1
Thread Starter
Lively Member
[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
Last edited by WarChild; Apr 13th, 2008 at 04:51 AM.
-
Apr 13th, 2008, 05:23 AM
#2
Hyperactive Member
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.
-
Apr 13th, 2008, 12:42 PM
#3
Thread Starter
Lively Member
Re: [2005] Wait For Mouse Click?
 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.
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
|