|
-
Jun 15th, 2000, 11:22 AM
#1
Thread Starter
Lively Member
I would like to change the forecolor of a label when a user passes over it, and return it to the my old color when they get off it...is this possible?(i think ive seen this before is all)
also anyone have an idea why the numbers 1-4 above the letters on my keyboard don't work?(i used numpad to show those incase you wondered)
-
Jun 15th, 2000, 11:29 AM
#2
Member
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'SET DEFAULT FORECOLOR
Label1.ForeColor = &H8000000F
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'SET DESIRED FORECOLOR
Label1.ForeColor = H80000012&
End Sub
Mikey
A/P
Using VB6 SP4 Enterprise Ed.
-
Jun 15th, 2000, 12:48 PM
#3
PowerPoster
SetSysColor API
You can use the SetSysColor API to change all your Windows System Color.
If you need the sample program that I've written to change all the system color, then just email me & I'll send it to you.
Code:
Option Explicit
Private Declare Function SetSysColors Lib "user32" (ByVal nChanges As Long, lpSysColor As Long, lpColorValues As Long) As Long
Const COLOR_INFOTEXT = 23
Const COLOR_INFOBK = 24
Private Sub Form_Load()
'This will change the ToolTips background color to Blue Colour
'and ToolTips text to Red Colour
SetSysColors 1, COLOR_INFOTEXT, vbRed
SetSysColors 1, COLOR_INFOBK, vbBlue
End Sub
-
Jun 16th, 2000, 02:38 AM
#4
Thread Starter
Lively Member
is there any kind of "mousemoveoff" sub?
-
Jun 16th, 2000, 02:47 AM
#5
I don't think there is..but put the change the labels color by putting the code in form_move or any command you want.
-
Jun 16th, 2000, 02:48 AM
#6
This code checks if the Mouse is on the Control or not.
Code:
If X < MyControl.Left Or X > MyControl.Width Or Y < MyControl.Top Or Y > MyControl.Height Then...
-
Jun 16th, 2000, 07:40 PM
#7
have a look at 'SetCapture' and 'ReleaseCapture' API calls at http://www.vbapi.com. using these functions you could easily implemet MouseEnter and MouseExit events.
best regards
Sascha
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
|