473,396 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

detect and close a modal dailog in c#

Hi, I would like to write a c# application. to detect if a modal dialog opens
on another application, (e.g. notepad.exe save changes dialog when you click
exit ) and auto cancel it. How do I detect the modal dialog opening?

Thanks for your help
Leni
Feb 21 '08 #1
2 3779
Hi Leni

First you have to know the name of the application you want to "control"
second the window name on which you want to click.
There is a Program called "spy.exe" for that. After you "know" your window
is open i would deal with sendkeys.

btw. There is a freeware application to do such things -AutoIT if you 've
not the time to reinvent the weel.

Cheers Marcel
Hi, I would like to write a c# application. to detect if a modal
dialog opens on another application, (e.g. notepad.exe save changes
dialog when you click exit ) and auto cancel it. How do I detect the
modal dialog opening?

Thanks for your help
Leni

Feb 21 '08 #2
Thanks Marcel, I'll have a look at that.

Leni

"Härry Marcel" wrote:
Hi Leni

First you have to know the name of the application you want to "control"
second the window name on which you want to click.
There is a Program called "spy.exe" for that. After you "know" your window
is open i would deal with sendkeys.

btw. There is a freeware application to do such things -AutoIT if you 've
not the time to reinvent the weel.

Cheers Marcel
Hi, I would like to write a c# application. to detect if a modal
dialog opens on another application, (e.g. notepad.exe save changes
dialog when you click exit ) and auto cancel it. How do I detect the
modal dialog opening?

Thanks for your help
Leni


Feb 22 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bill Belliveau | last post by:
Hi all, This is partially a .NET question and partially scripting (whichever works :) I recently wrote a vCard parser that sends vCards directly to the brower as a stream. After the file is...
1
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of...
2
by: anil kumar via .NET 247 | last post by:
(Type your message here) hi, i am using save & cancel webform button my webpage to with somevalidations , when i am trying to save my content it is savedthat time i need a popup msg like ur 'data...
1
by: Jeremy | last post by:
Hello, I'm thinking this may be an easy one but I am getting frustrated. How can I detect if a process is showing a modal dialog. Like "Are you sure you want to exit?", or an error message...
2
by: Viks | last post by:
Hi everyone, I am beginner at javascript.One of the web applications that i am currently developing,requires to upload file from the client side to the server.The condition being that the file...
1
by: dan.c.roth | last post by:
oForm.Close() vs this.Close() in a modal dialog. oFrom.Close() calls Form.Dispose() but this.Close() ,say in the click event of the Form, does not. I can think of the reason for this but is...
6
by: Steve | last post by:
Hi All I have an on-screen keyboard within a POS program I have written in VB.net 2005, for touch screen computers I have it set to 'always on top' so the user can move the cursor to...
21
by: Bob Darlington | last post by:
I have a routine which checks idle time and opens a pop up screen to advise users before shutting them down. The pop up has an option for the user to keep the application open, in which case the...
3
by: premMS143 | last post by:
Hi, I' developing a VB application. When user clicks on 'Tools' option from the Main Form, a dailog box will appear, which is developed using another VB form itself. But while the dailog box is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.