Re: Overcoming a MsgBox's shyness
- From: "David Youngblood" <dwy@xxxxxxxxx>
- Date: Sat, 13 Jun 2009 05:50:01 -0500
"Howard Kaikow" <kaikow@xxxxxxxxxxxxx> wrote...
"Bill McCarthy" <TPASoft.com Are Identity Thieves> wrote...
Hi Howard,
It depends on what value is used with SetWindowPos. If the form is set
as
topmost, then yes I'm pretty sure (untested) that it can be in front of a
message box from another form.
In this case, it's more complex.
The VB 6 program is dynamically creating an Excel workbook, and creating
the
code modules i nthe Excel workbook. one of which is the
Workbook_BeforeClose
event.
I finally figured out that when the VB 6 program causes Excel to CLOSE the
workbook just created, the code is hanging in the Workbook_BeforeClose
event.
After creation, the Excel workbook code works as expected. Problem only
occurs when VB 6 is first creating the workbok via Excel.
Fortunately, the MsgBox was only used to test the events, so I could just
delete the Msgbox, but I then noticed the vbMsgBoxSetForeground constant.
Testing that constant in a particular circumstance does not answer the
general question.
I asked here to get the experience of others.
As long as you're testing you might also test vbSystemModal. It's not system
modal as described in help, but in my limited experience, it does bring the
msgbox to the top of all applications. Similar to setting topmost.
David
.
- Follow-Ups:
- Re: Overcoming a MsgBox's shyness
- From: Howard Kaikow
- Re: Overcoming a MsgBox's shyness
- References:
- Overcoming a MsgBox's shyness
- From: Howard Kaikow
- Re: Overcoming a MsgBox's shyness
- From: Bill McCarthy
- Re: Overcoming a MsgBox's shyness
- From: Howard Kaikow
- Overcoming a MsgBox's shyness
- Prev by Date: Re: Walkthrough Instruction Error
- Next by Date: Re: Walkthrough Instruction Error
- Previous by thread: Re: Overcoming a MsgBox's shyness
- Next by thread: Re: Overcoming a MsgBox's shyness
- Index(es):