-
Sep 24th, 2020, 02:15 AM
#1
Thread Starter
Addicted Member
[RESOLVED] how to catch msgbox popup event ?
Hi ~ ALL
My App use many msgbox in many place ( in vb class )
when msgbox popup , Form maybe minimize in windows taskbar
I can not see the popup of msgbox
how to auto let Form maximize when msgbox popup
( how to catch msgbox popup event )
Last edited by quickbbbb; Sep 24th, 2020 at 02:41 AM.
-
Sep 24th, 2020, 02:20 AM
#2
Re: how to catch msgbox popup event ?
I assume you have code in each form to show the msgbox?
Then start with something basic like:
Code:
If Me.WindowState = vbMinimized Then Me.WindowState = vbNormal
MsgBox ...
-
Sep 24th, 2020, 02:34 AM
#3
Thread Starter
Addicted Member
Re: how to catch msgbox popup event ?
I know your methode
But .... It is not good idea
because
(1)
in vb class use "If Form1.WindowState = vbMinimized Then Me.WindowState = vbNormal"
is not good idea
(2)
My App use many msgbox in many place
I will add very many code of "If Form1.WindowState = vbMinimized Then Me.WindowState = vbNormal"
-
Sep 24th, 2020, 03:54 AM
#4
Re: how to catch msgbox popup event ?
Replace calls to MsgBox with calls to custom MyMsgBox function or yours.
In MyMsgBox first check ActiveForm is not Nothing and ActiveForm.WindowState being vbMinimized and if needed restore form with ActiveForm.WindowState = vbNormal before calling original MsgBox.
cheers,
</wqw>
-
Sep 24th, 2020, 04:46 AM
#5
Thread Starter
Addicted Member
Re: how to catch msgbox popup event ?
Originally Posted by wqweto
replace calls to msgbox with calls to custom mymsgbox function or yours.
In mymsgbox first check activeform is not nothing and activeform.windowstate being vbminimized and if needed restore form with activeform.windowstate = vbnormal before calling original msgbox.
Cheers,
</wqw>
good !!
thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|