|
-
Jun 16th, 2005, 03:43 PM
#1
Thread Starter
New Member
Need help with MouseMove function inside tabpages
I was having trouble with a mousemove sub in the application I am working on. If I use the following :
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
the program will pick up mouse movements correctly around the perimeter of the tab pages. However, the sub does not respond to movements inside the tab pages. I thought this problem might be because Vb.net uses tabpages instead of tabcontrol to raise the event when the mouse position is inside the tab page, but even if this is the case, I still do not know how to modify the sub to pick up the movements. Could someone help me?
Last edited by jacal; Jun 16th, 2005 at 07:10 PM.
-
Jun 17th, 2005, 12:12 AM
#2
Re: Need help with MouseMove function inside tabpages
well the form_mousemove event ISN'T supposed to capture mouse movement when you move the mouse over controls. It is only raised when the mouse is moved over an empty form area.
If your question is how can you capture the mouse event for each single tab page then I guess you can dynamically add the event for all the tab pages. This adds the MouseMove event to all the tab pages:
VB Code:
Dim i As Integer
For i = 0 To TabControl1.TabCount - 1
AddHandler TabControl1.TabPages(i).MouseMove, AddressOf TabControl1_MouseMove
Next
Private Sub TabControl1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TabControl1.MouseMove End Sub
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jun 17th, 2005, 09:28 AM
#3
Thread Starter
New Member
Re: Need help with MouseMove function inside tabpages
Okay, that works. Thank you.
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
|