Results 1 to 12 of 12

Thread: focus

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545

    focus

    what can i use to always give my application focus over other applications? i plan to use a timer too.
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Are you talking about always having your program the top most window? If so, thats pretty easy to do. If this is what you want, let me know. I have some code that will do that.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545
    i want it to always have focus so when i type, textbox gets the keystrokes.
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  4. #4
    Are you trying to make a keylogger? Search the forums if so, there are a lot of threads on it.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545
    thanks for always answering filburt. i am not making a keylogger. i made a screen saver and placed in the start up directory but sometimes, my screensaver doesn't get focus so i can't type my password into the text box.
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  6. #6
    Originally posted by Hawk
    i want it to always have focus so when i type, textbox gets the keystrokes.
    For it to ALWAYS have focus, put AppActivate Me.Caption in the Form_LostFocus event.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545
    way to go. that work but i placed in a timer. lost_focus did not work as well.
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  8. #8
    But otherwise everything's cool?

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545

    Thumbs up

    yes everything is cool, thanks filburt.
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  10. #10

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    Forest
    Posts
    545
    just want to share this with you Filburt. using appactivate works but when my form does not have a caption, there is a problem. i found this which works really well cuz it uses the form's handle.

    Private Declare Function SetForegroundWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
    Bird of Prey

    Mr. Bald Eagle.
    [img][/img]

  12. #12

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