CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Window Focus

  1. #1
    Join Date
    Nov 1999
    Location
    Western Australia
    Posts
    4

    Window Focus

    I have written an application that has requirement to maintain the window focus reagrdless of any other applications that are open. Hence if you try to lose the focus of the application it sets the focus back again immediately. Hence the desired affect is never to lose focus of my application. Can anyone help?


  2. #2
    Join Date
    Nov 1999
    Location
    Italy
    Posts
    80

    Re: Window Focus

    Try this:


    private sub form_lostfocus()
    me.setfocus
    endsub





    Something over there is coding....
    ... and you don't know!

  3. #3
    Join Date
    Nov 1999
    Location
    Western Australia
    Posts
    4

    Re: Window Focus

    I have already looked at this. The problem with setfocus and lose focus is that their scope is only applicable within the application itself. Hence other applications that are open can steal the focus from my applications window. The MSDN can explain this better.

    Good suggestion though.

    Any more thoughts out there?


  4. #4
    Join Date
    Oct 1999
    Location
    CA
    Posts
    91

    Re: Window Focus

    You could try loading your form as a modal form.

    Brewguru99

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

Featured