Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Program needs to have focus full time

Program needs to have focus full time

Scheduled Pinned Locked Moved Visual Basic
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bruceb
    wrote on last edited by
    #1

    I have a program that needs to have focus all the time but have no idea where to start. The program is set to form on top but I do not want it to lose focus. Please help!!:confused:

    D 1 Reply Last reply
    0
    • B bruceb

      I have a program that needs to have focus all the time but have no idea where to start. The program is set to form on top but I do not want it to lose focus. Please help!!:confused:

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      First, your Application never really has the focus. It's title bar changes color because one of it's child controls has the focus. A form is nothing but a control, but a control that can contain other controls. Individual controls get and lose focus. Its a pain to manage if your trying to retain the input focus to just your app (form). You have to keep track of which control actually has the focus and if none of your child controls has the focus anymore, which control do you give it back to? A better way would be to redo the form(s) your using and show them as system modal dialog boxes. This way, Windows manages the focus for you and you can't leave the app until the dialog box goes away. Search the documentation for ShowDialog to see what I mean. Your app needs to have the focus all the time? Why? It kind of make using the rest of the system a pain to use if you can't so much as click on the "Start" button... RageInTheMachine9532

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups