Solved

VB3 MSGBOX Detection with API

Posted on 1997-06-16
4
407 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now