troubleshooting Question

Determining when the cursor enters a groupbox...

Avatar of computerg33k
computerg33k asked on
Visual Basic.NET
4 Comments1 Solution379 ViewsLast Modified:
Currently I have:


Private Sub GbJobGroup_MouseMove(ByVal sender As Object, ByVal e As System.EventArgs) Handles gbJobGroup.Enter
txtComments.Size =

New System.Drawing.Size(936, 21)
txtComments.Location =

New System.Drawing.Point(40, 656)
btnComments.BringToFront()

txtComments.SendToBack()

tvMain.Size =

New System.Drawing.Size(16, 656)
BtnShowTV.BringToFront()

tvMain.SendToBack()


txtDiligentAttempts.Size =

New System.Drawing.Size(16, 656)
txtDiligentAttempts.Location =

New System.Drawing.Point(992, 48)

txtComments.Size =

New System.Drawing.Size(936, 21)
txtComments.Location =

New System.Drawing.Point(40, 656)
btnComments.BringToFront()

txtComments.SendToBack()

btnDiligentAttempts.BringToFront()

btnComments.BringToFront()

BtnShowTV.BringToFront()


End Sub
 

However, the code is not hit unless I click inside of the groupbox.  

This code is used to determine when to minimize a textbox that comes out vertically (there is one on the right, one on the left, and one on the bottom that opens up horizontally) like outlooks menus.  Current I use:

Private

Sub frmParent_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
XCord = e.X

YCord = e.Y


If XCord >= 9 Then
txtComments.Size =

New System.Drawing.Size(936, 21)
txtComments.Location =

New System.Drawing.Point(40, 656)
btnComments.BringToFront()

txtComments.SendToBack()

tvMain.Size =

New System.Drawing.Size(16, 656)
BtnShowTV.BringToFront()

tvMain.SendToBack()


Else
txtComments.Size =

New System.Drawing.Size(936, 21)
txtComments.Location =

New System.Drawing.Point(40, 656)
btnComments.BringToFront()

txtComments.SendToBack()

tvMain.Size =

New System.Drawing.Size(352, 656)
BtnShowTV.SendToBack()

tvMain.BringToFront()


End If

If XCord >= 991 Then
txtDiligentAttempts.Size =

New System.Drawing.Size(336, 656)
txtDiligentAttempts.Location =

New System.Drawing.Point(672, 48)
txtDiligentAttempts.BringToFront()

btnDiligentAttempts.SendToBack()


Else
txtDiligentAttempts.Size =

New System.Drawing.Size(16, 656)
txtDiligentAttempts.Location =

New System.Drawing.Point(992, 48)

End If

If XCord = 40 And YCord = 656 Then
txtComments.Size =

New System.Drawing.Size(936, 168)
txtComments.Location =

New System.Drawing.Point(40, 504)
txtComments.BringToFront()

btnComments.SendToBack()


Else
txtComments.Size =

New System.Drawing.Size(936, 21)
txtComments.Location =

New System.Drawing.Point(40, 656)
btnComments.BringToFront()

txtComments.SendToBack()


End If
btnDiligentAttempts.BringToFront()

btnComments.BringToFront()

BtnShowTV.BringToFront()


End Sub
 

To determine when the comment boxes should be 'stored away' or opened.  However, if the user goes straight from the comment box, to a group box, the comment boxes don't get 'stored away'.  

What can I use to determine when the mouse cursor enters the groupbox?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros