Hi,
I want my form be visible only when the mouse is pointing on
it.
Can anyone tell me how to implement it?
Thank you in advance!!
yli
Printable View
Hi,
I want my form be visible only when the mouse is pointing on
it.
Can anyone tell me how to implement it?
Thank you in advance!!
yli
This sample only works in MDIForm
(which you can modify to suit your need on normal form).
Step 1: Create a MDI form
Step 2: Create a MDIChild Form
Step 3: Put the code below in MDI form:
The concept: Set visible=true everytime the MDIChild form
is in the ranges of X and Y coor of the mouse.
-------------
Private Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (X > Form1.Left) And (X < (Form1.Left + Form1.Width)) Then
If (Y > Form1.Top) And (Y < (Form1.Top + Form1.Height)) Then
Form1.Visible = True
Else
Form1.Visible = False
End If
Else
Form1.Visible = False
End If
End Sub
-------------
Hope can help
Regards
Keiko