Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Displaying a form Form a Form ?

Displaying a form Form a Form ?

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++visual-studioquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fritzables
    wrote on last edited by
    #1

    Happy New Year To All, Up until now I have being using VS C++ 2005 to write Console type applications. I have been using VS C++ for about 6 months now. I now have a need to develop a Windows Form application but I am stuck on a issue which most will consider to be pretty basic - but I need to ask anyway. The application I am writing has a main form (Form1) and needs to show a second modal form (Form2), so to do this I have added a form to the project and in Form1.h I have #include "Form2.h" Now under the code for Form1.h there is a lot of code, like: public ref class Form1 : public System::Windows::Forms::Form and void InitializeComponent(void) to just name a few. Ok... where will be the correct place to declare Form2 so that I can then use Form2->ShowDialog(); ? Hope all this makes sense :) Regards Fritzables

    K 1 Reply Last reply
    0
    • F Fritzables

      Happy New Year To All, Up until now I have being using VS C++ 2005 to write Console type applications. I have been using VS C++ for about 6 months now. I now have a need to develop a Windows Form application but I am stuck on a issue which most will consider to be pretty basic - but I need to ask anyway. The application I am writing has a main form (Form1) and needs to show a second modal form (Form2), so to do this I have added a form to the project and in Form1.h I have #include "Form2.h" Now under the code for Form1.h there is a lot of code, like: public ref class Form1 : public System::Windows::Forms::Form and void InitializeComponent(void) to just name a few. Ok... where will be the correct place to declare Form2 so that I can then use Form2->ShowDialog(); ? Hope all this makes sense :) Regards Fritzables

      K Offline
      K Offline
      Kotesh N
      wrote on last edited by
      #2

      write the constructor of form1 in that create an object of form2 and call the form2->showdiaLOG

      F 1 Reply Last reply
      0
      • K Kotesh N

        write the constructor of form1 in that create an object of form2 and call the form2->showdiaLOG

        F Offline
        F Offline
        Fritzables
        wrote on last edited by
        #3

        G'Day Kotesh, Can you provide sample code on where and how I would achieve this - remember this is all reasonably new to me. Fritzables.

        K 1 Reply Last reply
        0
        • F Fritzables

          G'Day Kotesh, Can you provide sample code on where and how I would achieve this - remember this is all reasonably new to me. Fritzables.

          K Offline
          K Offline
          Kotesh N
          wrote on last edited by
          #4

          this site will help you alot in win32 programing http://www.flounder.com/download.htm#Complete Win32 CD Contents click Complete Win32 CD Contents Chinna

          F 1 Reply Last reply
          0
          • K Kotesh N

            this site will help you alot in win32 programing http://www.flounder.com/download.htm#Complete Win32 CD Contents click Complete Win32 CD Contents Chinna

            F Offline
            F Offline
            Fritzables
            wrote on last edited by
            #5

            Thanks Chinna, Much appreciated. Pete

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups