Results 1 to 4 of 4

Thread: Focussing a form

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hooglede (belgium)
    Posts
    63

    Question

    Hi,

    does anybody know why nothing happens when I use the gotfocus or lostfocus of a form. Apparently those events just don't get triggered.

    THANKS :-)


  2. #2
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    is this the only form in your application? i.e. are you expecting the events to fire when your "APP" loses focus, and not the form as such, or is it just a form that gets loaded within an app. I ask because I had a similar problem.
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hooglede (belgium)
    Posts
    63
    I've made shell program where from you can execute different other programs. So now I want to now wich form got the focus to trigger a method in my shell.

    Also I found on the msdn some information concerning the focus.
    nl.:
    A form can receive focus only if it doesn't contain any controls that can receive the focus.

    So now I have to find an other way to trigger the method in my shell.



  4. #4
    Guest
    You have to subclass to do detect whether the form has gained or lost focus. Take a look at this thread to understand more.

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