Results 1 to 2 of 2

Thread: Put on Top

  1. #1

    Put on Top

    I am writing some code in Excel VBA
    My problem is that messages I give the user do not alwaws appear "On Top" and can be obscured by other windows which appear.
    How do I force my Dialog Boxes to be on top ?

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Hollywood (sorta), California, USA
    Thanked 0 Times in 0 Posts

    Re: Put on Top

    Gee, an example of your code might be helpful.

    But one trick that I've employeed is an API call to GetActiveWindow before displaying the next form or message dialog. This function seems to not only return the long handle of the activewindow, but also sets the current application window to the Windows system recognized activewindow (giving it focus to boot). Don't know if that's the exact technical explanation, but it works.

    I've used this in situations where setting a form's StartupPosition property doesn't work as desired no matter which option I pick.
    Kevin <IMG SRC= alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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