View Single Post
Old Feb 10th, 2007, 1:07 PM   #1
L.Sharp
Newbie
 
Join Date: Feb 2007
Posts: 1
Rep Power: 0 L.Sharp is on a distinguished road
How to "ShowModal"

Hello! I am new on C++ and today I have a very big problem. I created a 2 forms (later will be more) program. In the first form I have a button that does this:
Form2->ShowModal();
. But on Form2, after I put this code:
Form2->Close();
i get the following error when I try to open my program: "EAccessViolation" and my program doesn't start.
I think it is because of my
Form2->Close();
code, because when I comment this code, my program works very well. So. How to correctly "ShowModal" a form, then deinitialize it correctly?

Programming environment: Borland CBuilder 6(Trial Version)
L.Sharp is offline   Reply With Quote