CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2001
    Location
    charlotte,nc
    Posts
    84

    Focus - i am sure this is an easy problem?

    Hi All!

    1) i have an sdi app
    2) i have a "main" form
    3) i have a second form displayed (vbmodal)
    4) in the 2nd form i use msgbox to prompt the user

    PROB: when the message box appears, the 1st form becomes visible (2nd is no longer visible)

    i have tried to corner the problem in the lost/gotfocus and/or (de)activate events to no avail.

    it appears as if the msgbox considers the 1st form as its owner.

    Regardless, i am at a loss as to how to fix this problem?

    can anyone help? this appears to be a very basic and simple, something i shouldn't be missing...

    all help is appreciated!

    Thank you

    Elizabeth

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Focus - i am sure this is an easy problem?

    You can send me the program, maybe I could help¿

    Hannes
    [email protected]

    F. T. W.

  3. #3
    Join Date
    Mar 2001
    Location
    charlotte,nc
    Posts
    84

    Re: Focus - i am sure this is an easy problem?

    i wish i could simply drop the app to you but, it is far too large.

    i am not sure why it always seems like the answer shows up as soon as i post the question. as i was trying to find appropriate code to send to you, i found a line that failed to set the style as vbmodal. as soon as i forced the style to vbmodal, the problem went away.

    i was hoping it would be so simple and obvious. just wish i had seen it before posting.

    thank you (for getting me to look)



    Elizabeth

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Focus - i am sure this is an easy problem?

    I'm glad you got right!
    Hannes

    F. T. W.

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