how to make a button get highlight or faded after we move mouse pointer on the button and the button attributes back to normal after mouse not on the button??can give source code sample??
Printable View
how to make a button get highlight or faded after we move mouse pointer on the button and the button attributes back to normal after mouse not on the button??can give source code sample??
vb Code:
Option Explicit Private Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function ReleaseCapture Lib "user32" () As Long Private Declare Function GetCapture Lib "user32" () As Long Private Const vbGray = &H8000000F Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 'the button style must be set to graphical for this to work If (X < 0) Or (Y < 0) Or (X > Command1.Width) Or (Y > Command1.Height) Then ReleaseCapture ' the mouse is no longer over the button, change backcolor to gray Command1.BackColor = vbGray ElseIf GetCapture() <> Command1.hwnd Then SetCapture Command1.hwnd ' the mouse is over the button, change backcolor to cyan Command1.BackColor = vbCyan End If End Sub
how bout change the size of command1/faded the button(work like toolbar)...any idea
sorry for asking many question, im new in vb6