Results 1 to 3 of 3

Thread: inputbox on top

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    4

    inputbox on top

    How do you make an inputbox 'always on top' or active?
    Because, I want my program to show the inputbox when i press F8.
    My program does not have focus at that time, but i hooked the keyboard, so there is no problem.

    Imagine i am in word, it fills my whole screen, and then i press F8, the inputbox then pops up, but, BEHIND word. I want it to pop up in front of all other windows and have immediate focus. How can i do that?

  2. #2
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: inputbox on top

    i think when you open an input box, it always stays on top of other programs... try changing the input box properties...
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  3. #3
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: inputbox on top

    I think ou can use SetForegroundWindow API to do that
    VB Code:
    1. Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
    2.  
    3. 'In a Form, call it this way
    4. SetForegroundWindow Me.hwnd
    To use it with an inputbox, you'll have to find the inputbox's hwnd first

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