Results 1 to 4 of 4

Thread: [RESOLVED] Label Ignores mouseenter

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    351

    Resolved [RESOLVED] Label Ignores mouseenter

    Hi all.

    I have a panel with a bunch of labels in it - added as controls. I have a mouse enter and mouseleave events for the panel which changes the backcolor of the panel.

    Problem is if the mouse goes over one of the labels in the panel, the label gets the mouse enter and the color of the panel changes back.

    How can i get the event not to fire when it goes over the labels?


    Hope this is clear, and apologies if has been answered before, did look for a while before posting.

    TIA

    Rico

  2. #2
    Frenzied Member bmahler's Avatar
    Join Date
    Oct 2005
    Location
    Somewhere just west of the Atlantic
    Posts
    1,568

    Re: Label Ignores mouseenter

    add the labels to the handles statement

    ie

    Private Sub Panel1_MouseEnter(...) Handle Panel1.MouseEnter, Label1.MouseEnter, Label2.MouseEnter
    etc
    Boooya
    • Visual Studio 2008 Professional
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • Don't forget to rate helpful posts!
    • If you're question was answered please mark your thread [Resolved]


    Code Contributions:
    PHP
    PHP Image Gallery v1.0PHP Image Gallery v2.0
    VB 2005
    Find Computers on a networkSimple License EncryptionSQL Server Database Access dllUse Reflection to Return Crystal ReportDocumentSilently Print PDFGeneric Xml Serailizer


    Useful Links: (more to come)
    MSDN (The first and foremost)MSDN Design Guidelines API Reference • Inno Setup CompilerInno Setup PreprocessorISTool - Fairly easy to use GUI for creating inno setup projects • Connection StringsNAnt -Automated BuildsCruise Control .NET - Frontend for automated builds

  3. #3
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Label Ignores mouseenter

    Check this out, it sounds very similar to your problem:

    http://forums.microsoft.com/MSDN/Sho...34313&SiteID=1

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    351

    Talking Re: Label Ignores mouseenter

    Thanks bmahler and Negative0 i used bmahler's suggestion. Thought there might be a property i could set for the label, but that worked fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width