Solved

VB3 MSGBOX Detection with API

Posted on 1997-06-16
4
415 Views
Last Modified: 2008-03-10
I need code for VB3 standard (16-bit) API functions to detect when a message box pops up on the screen.  Either from the vb app or from another app or windows in general.  I also need to be able to get the text from the message box and store it as a string and also send a keypress to the msgbox to close it automatically.
0
Comment
Question by:ChrisK
  • 2
4 Comments
 
LVL 3

Expert Comment

by:rmichels
ID: 1427326
Are you looking for a specific message box, or any message box?  Are you looking for a specific period in time, or just waiting forever and sending keys to the message box.  The reason I ask, is if you are just trying to generically close down any message box that pops up, I don't think you can do that. But, if you are initiating a specific task that will pop-up a message box AND you know the message box title (or range of titles), you can run through the desktop windows (EnumChildWindows is the API).
0
 
LVL 2

Author Comment

by:ChrisK
ID: 1427327
I'm trying to detect system errors...like GPF's or out of virtual memory...stuff like that, and be able to retrieve the message in the message box and then close the message box automatically...am I trying the impossible?
0
 
LVL 5

Accepted Solution

by:
y96andha earned 20 total points
ID: 1427328
That is impossible. Message boxes that indicate severe errors are system modal, and while they are active, no other applications can run.
0
 
LVL 2

Author Comment

by:ChrisK
ID: 1427329
That's what I was afraid of...
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question