CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    132

    Tooltip Placement?

    Hi,

    I use my program on a multi monitor pc. My Form starts up with it's .Left property set to -1024 to put it onto the 2nd monitor, but the tooltips show up on the other monitor. You would think it would show at the mouse pointer, but it doesn't. Anyone know any fixes for this?

  2. #2
    Join Date
    Dec 2001
    Posts
    6,332

    Re: Tooltip Placement?

    I think it may be due to the fact that the behavior of ToolTips is to be aligned on the screen so as to be visible no matter where the mouse is. A negative number would essentially put it off the screen.

    The ToolTips in VB are not quite the same as those provided by the win32 API, so it might be possible to use that instead. I've tried moving the ToolTip window to specific coordinates, and windows insists on putting it where the mouse is. However, it will still align itself to remain totally visible if the end of the window would otherwise be off the screen. What I've ended up doing is to create a "normal" window that just looks like a ToolTip, so I can put it where I want. It does mean showing and hidding it via code, but the end results might be worth the effort.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Tooltip Placement?

    You might want to create your own box, and have full control over it.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Tooltip Placement?

    Quote Originally Posted by WizBang
    I think it may be due to the fact that the behavior of ToolTips is to be aligned on the screen so as to be visible no matter where the mouse is. A negative number would essentially put it off the screen.
    100% Correct... (AFAIK)

    What i could sujest is moving your screens around so that you dont need to use neg. values..

    But when i set up a Second Monitor to assit with some work i was doing, I found that although Windows supports Mutli monitors, It's Primarally designed for Single monitor use... Everything is placed on the Primary monitor.. Some applications wont even display on the secondary monitor,(expecially video type software)..

    Quite a few functions of windows will not work on the Secondary monitor.. Some thing even as simple as a Object.refresh has some weird results on a secondary monitor...

    Richard...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  5. #5
    Join Date
    Aug 2004
    Posts
    132

    Re: Tooltip Placement?

    Thanks for all the information. I think I'll make my own box as suggested.

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

Featured