> I have a special DOS program running on Windows XP and when my users close
> the program with the "X" on the title bar it causes lots of issues. Is there
> away to disable the "X"?
>
> Thanks for any suggestions.
Why don't you just run it minimized?
--
Phil Robyn
University of California, Berkeley
You could run the program "invisibly" eg by having another program start it
invisibly eg using a vbscript "wrapper" [WshShell "Run" method]
Alternatively, if you need some kind of user interaction, and you have
access to a package, that can enable you to create a small dialog, such as
Visual Basic, Visual C++, Visual Studio, then that is something you can
readily disable in your own custom dialog.
Jon
eg
cmd /k programname.exe
after making the above change
(Type exit or ALT-Enter, or Windowskey-D, Windowskey-M to leave full screen
mode)
Jon
"Steve" <St...@discussions.microsoft.com> wrote in message
news:B1DBD1CC-0AC7-4FEE...@microsoft.com...
> This program needs to be used by the users. It is a POS sales program. But
> it
> needs to be exited by having the user escape out. When they close it using
> the X it causes errors in the database file.
What about hiding the title bar? Is there an easy way to do that maybe?
I wanted to write such a little tool for a long
time. Not I did and I think I found a volunteer
for testing it :-)
http://www.uwe-sieber.de/files/consolenoclose.zip
Greetings from Germany
Uwe
Steve
Greetings from Germany
Uwe
Thanks.
The X button is internally linked with the Close command
in the window's system menu. So disabling and removing
the Close item from the menu grays out the X button.
In VB:
Sub DisableCloseButton(h As Long)
Dim hMenu As Long
hMenu = GetSystemMenu(h, 0)
Call EnableMenuItem(hMenu, SC_CLOSE, MF_BYCOMMAND Or MF_GRAYED Or MF_DISABLED)
Call DeleteMenu(hMenu, SC_CLOSE, MF_BYCOMMAND)
End Sub
Greeting from Germany
Uwe
Thank You