Results 1 to 2 of 2

Thread: Help.. How To Stop Window From Gaining Focus

  1. #1

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    Help.. How To Stop Window From Gaining Focus

    How would I go about stopping my programs window from gaining focus... For Example, lets say i have 2 forms... 1 form would be named frmmain and the other frmwebbstat.. now frmwebbstat contains a webbrowser control and frmmain a simple command button, frmmain would be loaded first of course and then when the command button is clicked, frmwebbstat would be loaded to check the status of a webpage but the form would be hidden from view... the problem is when the frmwebstat checks the webpage, frmmain looses focus... how would i go about stopping frmwebbstat from gaining focus... i can't just have a timer set frmmain's focus over and over again because other processes need to gain focus if need be, frmwebbstat is the only thing i don't want to have focus set to... i tried handling the wm_activate msg and returning true to the windproc but that didn't work... I have to use the webbrowser control, its not a choice so please don't suggest using Winsock or Inet or anything like that...

    Thanx,
    AAG
    This Business Is Binary. Your a 1 or a 0. Alive or Dead. (AntiTrust)

  2. #2
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    well, you can
    VB Code:
    1. frmWebStat.Enabled = False
    This help?
    Luke

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