Problem with Activation 
Author Message
 Problem with Activation

I'm pretty new to VB, so if this is a really dumb question, I apologize :)

I have an application that uses several different forms that are called from
a main form's menu.  In these forms, whenever I used the MsgBox function,
after hitting OK, the Activate message is sent back to the main form.  I
don't want it to do this.  My main form has an Activate event handler to set
the focus to a text field, so whenever a sub form uses a MsgBox, the focus
goes back to a text field on the Main form when I want the focus to remain
with the sub form.  Anybody know a workaround or reason for this?

Thanks,

Mike



Mon, 21 May 2001 03:00:00 GMT  
 Problem with Activation
What about loosing the Activate code, and leaving the focus
remain on whatever it was that called the MsgBox?

Simply look for another way to do whatever that Activate
code does, like set the TabIndex of your controls to
handle the focus on startup.

LFS

Quote:

> I'm pretty new to VB, so if this is a really dumb question, I apologize :)

> I have an application that uses several different forms that are called from
> a main form's menu.  In these forms, whenever I used the MsgBox function,
> after hitting OK, the Activate message is sent back to the main form.  I
> don't want it to do this.  My main form has an Activate event handler to set
> the focus to a text field, so whenever a sub form uses a MsgBox, the focus
> goes back to a text field on the Main form when I want the focus to remain
> with the sub form.  Anybody know a workaround or reason for this?

> Thanks,

> Mike



Mon, 21 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem resizing OLE control on activation

2. focus/activation problem with VB5 user control

3. Com+ Activation problem :(

4. COM Activation problem

5. activation of design changes to other users

6. Automatic OLE Activation

7. In-Place Activation of Outlook

8. does VB script or debugger need activation?

9. Outlook doesn't properly start on external activation

10. Project Window Activation from Resource Sheet if any

11. error activation of a project

12. Activation symbol in sequence diagrams

 

 
Powered by phpBB® Forum Software