HighTechTalks DotNet Forums  

Mouse Question?

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Mouse Question? in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jerry
 
Posts: n/a

Default Mouse Question? - 05-18-2007 , 12:10 PM






Programming with VB Express:
Need help with code to be able to move mouse to a position on a form
ex...341,22 to 553,148. Then when I do a left mouse click, it hides the
current form and goes to a new form.

Thanks,
Jerry


Reply With Quote
  #2  
Old   
pvdg42
 
Posts: n/a

Default Re: Mouse Question? - 05-18-2007 , 02:24 PM







"Jerry" <Jerry (AT) discussions (DOT) microsoft.com> wrote

Quote:
Programming with VB Express:
Need help with code to be able to move mouse to a position on a form
ex...341,22 to 553,148. Then when I do a left mouse click, it hides the
current form and goes to a new form.

Thanks,
Jerry

Have a look here to get you started:

http://msdn2.microsoft.com/en-us/lib...rs(VS.80).aspx

Note the Position property.




Reply With Quote
  #3  
Old   
Jerry
 
Posts: n/a

Default Re: Mouse Question? - 05-19-2007 , 09:39 PM



Thanks for the lead, here's what I have, but still doesn't totally work. I
want to hav form2 loaded when I click the mouse in a pcture box at say
location 362,61, the location of the mouse click shows up in the textboxes,
but it will not load form2. ny suggestions?
Thanks,
Jerry

Private Sub PictureBox1_MouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick
Dim mouseX As Integer = e.X
Dim mouseY As Integer = e.Y
TextBox1.Text = e.X
TextBox2.Text = e.Y
If TextBox1.Text = 341 > 553 And TextBox2.Text = 22 > 148 Then
Form2.Show()
Me.Hide()


End If
End Sub

"pvdg42" wrote:

Quote:
"Jerry" <Jerry (AT) discussions (DOT) microsoft.com> wrote in message
news:799FB54F-4CE9-424C-A7D0-60CC9F928160 (AT) microsoft (DOT) com...
Programming with VB Express:
Need help with code to be able to move mouse to a position on a form
ex...341,22 to 553,148. Then when I do a left mouse click, it hides the
current form and goes to a new form.

Thanks,
Jerry


Have a look here to get you started:

http://msdn2.microsoft.com/en-us/lib...rs(VS.80).aspx

Note the Position property.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.