473,805 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto Answer a Msgbox that appears upon opening file

2 New Member
I have a macro that loops through and opens a number of files. In each file there is an event procedure upon opening that displays an informational msgbox (The only option is to click ok). I'm trying to have my code click okay so that I don't have to sit here and hit enter (literally hundreds of times) as each file opens. Application.dip lay alerts = false does not work, and changing the msgbox event procedure is unfortunately not an option. Any code that would take care of this would be greatly appreciated.
Jul 21 '10 #1
2 1902
vb5prgrmr
305 Recognized Expert Contributor
This really depends upon your code and what you are doing, but, one can accomplish this with the EnumChildWindow s API to look for the msgbox and then use it to find the button handle. Then you can use SendMessage to send WM_MBUTTONDOWN AND WM_MBUTTONUP messages to the button to simulate a click on it...



Good Luck
Jul 22 '10 #2
PaulSW
2 New Member
Thanks for the suggestion.
Jul 22 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2083
by: Eric Caron | last post by:
Hi Here's my problem, I create a windows service with Config.xml file. All setup for my service is in this file. I create a windows application to manage these settings (Config.XML File). This work good if the two applications are in the same folder and Config.XML is in the folder too but If not, my windows application setting don't work. In my windows form I have a Service controler components to manage my service (start, stop, ...)....
2
1618
by: Fraser Ross | last post by:
I want to prevent std::basic_ifstream from opening a file for reading when it is passed the file name with any wrong case of a letter. If that can't be done is there anything else that could be done before opening? The program is for Windows. Fraser.
1
4406
by: Alfons | last post by:
Hello, I have build a program that can do file transferring between a Windows XP computer and a DOS computer via a serial port. The Windows program I have build in C++ with Visual Studio 6.0. The DOS program I made in Turbo C++ 3.0. At this moment I am in a test phase of sending files and directories. The code I am using in DOS to open a file for writing looks like this (forgive me the typos, since I only have my source code at work...
0
2411
by: (Pete Cresswell) | last post by:
I've been plagued by these over the years. The text is something to the effect of "Object doesn't exist". Today I started getting the error upon opening a multi-subform form that's been working since day 1. Stepping through the code, I found the subform that was causing the problem. If the parent form is then opened in design mode and then re-opened, the error does not happen. Next time the app is started up from scratch, it...
28
3286
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr(); fopen("c:\\autoexec.bat","r")&&printf("success") || printf("error opeing
3
1354
by: Alvo von Cossel I | last post by:
hi, i have a working console app. however, it closes as soon as it opens. i know that it works because i can just about read it. how do i stop it from closing straight after opening? -- Alvo von Cossel I of Germany
0
1253
by: MLH | last post by:
I have a main report with a subreport on it. Main name: rptInvoiceMain Sub name: rptInvoiceSubReport The main report is unbound. A fiew calculated controls are all it has. The subreport is bound to a query. That's what I wanna filter upon opening the main report for printing.
5
1985
by: bimeldip | last post by:
Hi, I an tryin to create a html page where users can choose a file and open it however, i keep getting it wrong.So far this is wat i've worked on: (open.html) <html> <head> <title>Opening file</title> </head> <body> <form action="display.php" method="POST"> Please choose a file: <input name="saved" type="file" /><br />
1
1036
by: Cancionero | last post by:
AllCon, I am currently creating a standard executable which, of course, starts with a form. I would like to set some variables to control some of the controls (i.e. set some optionbutton captions and the strting location of a Dirlist) of the form upon opening the executable but I can't find an open document event. Any ideas? Any help would be greatly apprciated. THanks
7
2470
by: dorandoran | last post by:
I used this article (http://www.codeproject.com/KB/webforms/EditNestedGridView.aspx) to accomplish expand/collaspe grid. I also added a search and it works. but i need to be now automatically expand the corresponded grid where search was found. User has to click on all the parent grid to find out which child grid has records. How can I automatically expand the grid where there are results? I probably need a function like below ExpandAll()...
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10103
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9179
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7644
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6874
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5676
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3839
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.