Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save changes in external apps using VB

Status
Not open for further replies.

vsaavedra

Technical User
Jun 28, 2003
1
PE
Hi, this is my first question in this forum...i hope you can help me.
I am making a program to shutdown PC, i have using the ExitWindowsEx function, but my application closes all open programs (Word, Excel, Notepad, etc) without saving changes.
I am using the EWX_FORCE flag because I need all the programs closes automatically before pc shutdown. But at the same time I need to save changes in all open application before shutdown, but it must be without user confirmation....you know, without the " Do you want to save changes?.." message. I want to know how can I close automatically all external open apps saving changes previously, and after that, shutdown the pc.
I know that I have to manage the answer to the WM_QUERYENDSESSION message, but I do not how.
Thank you in advance.
 
You've got no control over how another application saves its values. It will ask, if it thinks it is necessary, for confirmation. You can only instruct the programs to shutdown, the way they do that is entirely up to them.

Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top