How to close form after block them from being execute?

This is a discussion on How to close form after block them from being execute? within the C++ Programming forums, part of the General Programming Boards category; Hi guys, I am using RightToLeft::Yes and RightToLeftLayout properties to set the form from left to the right. My problem ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    40

    How to close form after block them from being execute?

    Hi guys,

    I am using RightToLeft::Yes and RightToLeftLayout properties to set the form from left to the right. My problem is that I couldn't be able to find the solution how to close the form when I am using the code to block the form from being execute while using RightToLeft::Yes and RightToLeftLayout properties, without using the block code it will be execute every time when I am trying to opening the form.


    I tried to use this:

    Code:
    private: System::Void Form2_FormClosing(System::Object^  sender, System::Windows::Forms::FormClosingEventArgs^  e) {
    if(!OkToClose)
    {
     e->Cancel = true;
    }
    }

    The form will be execute when I opening the form every time, so I am now using the current code which I am using this right now:

    Code:
    private: System::Void Form2_FormClosing(System::Object^  sender, System::Windows::Forms::FormClosingEventArgs^  e) {
    if(OkToClose)
    {
     e->Cancel = true;
    }
    }

    Now, I am trying to close the form, but I can't be able to do because I am using the block code to avoid the form from being execute when I opening them. I can't find a way to close the form. Do you know how to close the form after I have block them from being execute when I am still using RightToLeft::Yes and RightToLeftLayout properties?



    Thanks,
    Mark
    Last edited by mark103; 05-03-2011 at 02:07 PM.

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    I have no idea. But then again, this isn't C++. So maybe you ought to post it in the proper section.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. when parent process close, how to close the child?
    By omega666 in forum C Programming
    Replies: 4
    Last Post: 04-06-2011, 12:23 AM
  2. Close most active form on desktop
    By franse in forum C++ Programming
    Replies: 2
    Last Post: 11-19-2008, 06:19 PM
  3. Pop up that doesn't block my form
    By mdoland in forum C# Programming
    Replies: 4
    Last Post: 10-18-2007, 04:04 AM
  4. Replies: 0
    Last Post: 06-26-2004, 05:59 PM
  5. How can I execute a dialog in the middle of a form in C++ Builder?
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 06-27-2002, 01:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21