Thread: Open a Form within a Form

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    385

    Open a Form within a Form

    If you are using C++ and through a button event want to open another form that you have created. How do you code a scenario like this.

    My project is called "Fonster".
    In this project I have made 2 Forms named "Form1" and "ResultReport".

    In Form1 I have made a button. When I press this button I want the Form "ResultReport" to open.

    What should I write between the {}:
    I am trying something like this but it doesn´t work. It has to be some other things to do also.
    Perheps I have to declare the Form ResultReport ? This is the first time I am doing this thing.
    When I run the code, the compiler
    says that ResultReport must point to a class/struct/union/generic type.
    Code:
    private: System::Void OpenForm_Click(System::Object^  sender, System::EventArgs^  e) 
    		 
    {		
       ResultReport->Show();
    }
    Last edited by Coding; 01-26-2008 at 09:44 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open Software License 3.0 Explained
    By laserlight in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-08-2008, 08:10 PM
  2. open empty file
    By mystic-d in forum C Programming
    Replies: 2
    Last Post: 11-16-2007, 10:27 AM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. To open or not to open ?
    By darfader in forum C Programming
    Replies: 7
    Last Post: 09-24-2003, 08:14 AM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM