Re: Posting an event
From: Trev Hunter (hunter_trev_at_hotmail.com)
Date: 02/15/04
- Next message: Carlos Guzmán Álvarez: "[ANN] Firebird .NET Data Provider 1.5 Release Candidate 4 released"
- Previous message: Lumpierbritches: "Re: .Net 2002 Open a text file and append"
- In reply to: Jeff Casbeer: "Re: Posting an event"
- Next in thread: Jeff Casbeer: "Re: Posting an event"
- Reply: Jeff Casbeer: "Re: Posting an event"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 15 Feb 2004 22:35:44 -0000
> But what if I want the message box to display immediately after my form
displays?
You could use the Activate event instead of the load event although you
would have to distinguish between the first time it is shown and times when
it is simply activated.
A better method would be to do the processing after you call Form.Show
(maybe with a call to DoEvents). E.g.
-------------------
Dim obJForm as new MyForm
objForm.Show
Application.DoEvents()
Messagebox.Show(........)
-------------------
If you could provide an explanation of what you're trying to accomplish, I
may be of more help. Also, try posting in the
microsoft.dotnet.framework.windowsforms group as this may be more
appropiate.
HTH,
Trev.
"Jeff Casbeer" <jeffcasbeer@hsi.com> wrote in message
news:0067C64C-27E7-4982-9443-4E3BAD8709CF@microsoft.com...
> Thanks Trev for your quick reply!
>
> I'm just trying to make a distinction between the Windows API options to
POST vs. SEND a Windows event. I'd really rather avoid trying to start a
new thread. I want the work to occur on this thread, just AFTER the
application returns to the Windows message handler and after Windows
processes anything else that entered the message queue before my POST. So,
for example, if I put a "MsgBox" in my form's load event, the message box
displays, then when I press OK the form displays. But what if I want the
message box to display immediately after my form displays?
>
> Is this not a valid technique with VB?
>
> Thanks - Jeff
- Next message: Carlos Guzmán Álvarez: "[ANN] Firebird .NET Data Provider 1.5 Release Candidate 4 released"
- Previous message: Lumpierbritches: "Re: .Net 2002 Open a text file and append"
- In reply to: Jeff Casbeer: "Re: Posting an event"
- Next in thread: Jeff Casbeer: "Re: Posting an event"
- Reply: Jeff Casbeer: "Re: Posting an event"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|