Re: changing lable backcolor




jack wrote:
> I wanted to change the back color of the label which im using instead
> of button
> what i want is to change the back color of the label whenever mouse is
> over it
> i know to api's which can be come how used with this control but dont
> how to use this perfectly
> please help

If I'm understanding what you want correctly, you shouldn't need any
API calls.

Add a label to a form and copy this code in. Just replace &HFFFFFFFF
with your color and repeat for each label you want.

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Label1.BackColor = &H8000000F
End Sub

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Label1.BackColor = &HFFFFFF
End Sub

.



Relevant Pages

  • Re: Font change on mouseover
    ... picture as the background...the only thing I need help figuring out is how to ... obviously I can modify the code that goes behind each label, ... Private Sub AddTransmittal_MouseMove(Button As Integer, Shift As Integer, ...
    (microsoft.public.access.modulesdaovba)
  • RE: Control Tip Text Question
    ... --You didnt try the frame control..No problems. ... ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) ... Private Sub CheckBox470_MouseMove(ByVal Button As Integer, ... i only want the label to be seen if mouse is over the checkbox. ...
    (microsoft.public.excel.programming)
  • Re: Floating Box for Prices
    ... (to trigger your floating window for example). ... Label control indicates when the "mouse down for a specified period" has ... Private tDown As Single, counting As Boolean ... Private Sub Picture1_MouseDown(Button As Integer, ...
    (microsoft.public.vb.general.discussion)
  • Re: A HELP BOX
    ... lblDescriptive is the name of the descriptive label placed near the textbox. ... Private Sub UserForm_Initialize ... 'Show the decriptive label on entry to the text field. ... name, CtrlTab twice, your Middle Initial, CtrlTab once, Last Name""" ...
    (microsoft.public.word.vba.general)
  • Re: Floating Box for Prices
    ... Often with things like floating information windows it is best to use a "hover period" so that the window appears if the user simply hovers the mouse in one spot for more than a predetermined period. ... The Label control indicates when the "mouse down for a specified period" has been activated and the Label disappears as soon as the user then lets go of the mouse button (the Label is just an indication of course, and you would simply modify the code to instead show your little floating "follow the mouse" information window. ... Private tDown As Single, counting As Boolean ... Private Sub Picture1_MouseDown(Button As Integer, ...
    (microsoft.public.vb.general.discussion)