I launch 2 programs within my application with PROGRAMNAME->Show. Let's call them Prog1 and Prog2. I have a dummy form that I use Application::Run to keep the software running. When 1 of the program closes, I call Application::Exit to shut down the application. This doesn't allow the other program to call Form_Closing. I want to disable the X in the upper right corner of Prog1 so that the user is forced to close using Prog2. Or, is there a way to call the Form_Closing event of Prog1 when Prog2 gets the X?

This is dependent on the platform you are writing your program for, Windows/Linux/Mac. There are forums for this indiviual platforms if you go to the forum index and scroll down a ways. You may get an answer here, but you are much more likely to get a response in the forum for the specific OS you are writing for.

And what compiler and version of that compiler are you using? Not all compilers are created equal.

This is dependent on the platform you are writing your program for, Windows/Linux/Mac. There are forums for this indiviual platforms if you go to the forum index and scroll down a ways. You may get an answer here, but you are much more likely to get a response in the forum for the specific OS you are writing for.

Actually, our Windows, Linux, and Mac forums are geared more towards end-user technical support, so this is the place to be if you're looking for programming help.

I stand corrected. Supply the operating system/platform target and compiler information and hopefully someone with knowledge appropriate to that combination will be forthcoming.

The target OS is Windows XP and I'm using Visual Studio .NET 2003. My code is being written in VC++.NET.

remove the X button altogether in the form's properties. I don't recall which one -- probably System property.

I believe that you're talking about FormBorderStyle. There's None that doesn't have the X, but this doesn't suit my needs. I need a form that can be resized.

Form property ControlBox is the one. When set to false, it hides the MIN, MAX, and Close buttons.

Form property ControlBox is the one. When set to false, it hides the MIN, MAX, and Close buttons.

Thanks a lot DonNetUser!:) I was having that problem earlier and I found this thread. Thanks again.

commented: bumping ancient thread -4
commented: Good for you, now read this http://www.daniweb.com/software-development/cpp/threads/78223 before you go digging up more corpses. Just hit the +/- next time! -4