Click here to Skip to main content
16,007,932 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Covariant return types Pin
VizOne26-Mar-03 8:35
VizOne26-Mar-03 8:35 
GeneralRe: Covariant return types Pin
Paul Selormey26-Mar-03 13:22
Paul Selormey26-Mar-03 13:22 
GeneralRe: Covariant return types Pin
Daniel Turini14-Apr-03 0:52
Daniel Turini14-Apr-03 0:52 
GeneralRe: Covariant return types Pin
Paul Selormey26-Mar-03 19:05
Paul Selormey26-Mar-03 19:05 
GeneralSocket function error Pin
TeraCoder24-Mar-03 14:23
TeraCoder24-Mar-03 14:23 
GeneralRe: Socket function error Pin
Paul Selormey24-Mar-03 17:33
Paul Selormey24-Mar-03 17:33 
GeneralForm within Form ... Pin
Maximilien21-Mar-03 11:59
Maximilien21-Mar-03 11:59 
GeneralRe: Form within Form ... Pin
Paul Selormey24-Mar-03 17:30
Paul Selormey24-Mar-03 17:30 
For your needs, I think UserControl will do. However, it is possible to place a form in a form. This key is setting the TopLevel property to false before adding and making sure it is visible.
It will even appear in the Designer, just that the TopLevel part will be deleted in the designer.

The following is a complete source which will compile to display a form in a form, try it...
#pragma once


namespace MustGo2
{
	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary> 
	/// Summary for Form1
	///
	/// WARNING: If you change the name of this class, you will need to change the 
	///          'Resource File Name' property for the managed resource compiler tool 
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public __gc class Form1 : public System::Windows::Forms::Form
	{	
	public:
		Form1(void)
		{
			InitializeComponent();
		}
  
	protected:
		void Dispose(Boolean disposing)
		{
			if (disposing && components)
			{
				components->Dispose();
			}
			__super::Dispose(disposing);
		}
	private: System::Windows::Forms::Form*  panel1;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container * components;

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->panel1 = new System::Windows::Forms::Form();
			this->panel1->TopLevel = false;
			this->SuspendLayout();
			// 
			// panel1
			// 
			this->panel1->AutoScaleBaseSize = System::Drawing::Size(5, 12);
			this->panel1->ClientSize = System::Drawing::Size(248, 198);
			this->panel1->FormBorderStyle = System::Windows::Forms::FormBorderStyle::Fixed3D;
			this->panel1->Location = System::Drawing::Point(16, 16);
			this->panel1->Name = S"panel1";
			this->panel1->Visible = true;
			// 
			// Form1
			// 
			this->AutoScaleBaseSize = System::Drawing::Size(5, 12);
			this->ClientSize = System::Drawing::Size(292, 266);
			this->Controls->Add(this->panel1);
			this->Name = S"Form1";
			this->Text = S"Form1";
			this->ResumeLayout(false);

		}	
	};
}

What I did is to place a planel using the Designer and then replaced it with Form class in the code Poke tongue | ;-P

Best regards,
Paul.


Jesus Christ is LOVE! Please tell somebody.
GeneralDisplaying a dialog from a DLL Pin
Squatch618-Mar-03 17:04
Squatch618-Mar-03 17:04 
GeneralRe: Displaying a dialog from a DLL Pin
Paul Selormey18-Mar-03 18:21
Paul Selormey18-Mar-03 18:21 
GeneralRe: Displaying a dialog from a DLL Pin
John R. Shaw29-Apr-03 19:13
John R. Shaw29-Apr-03 19:13 
GeneralManaged and Unmanaged Pin
Nicholas Naddaf18-Mar-03 7:32
Nicholas Naddaf18-Mar-03 7:32 
GeneralRe: Managed and Unmanaged Pin
Nish Nishant18-Mar-03 7:36
sitebuilderNish Nishant18-Mar-03 7:36 
GeneralRe: Managed and Unmanaged Pin
Nicholas Naddaf18-Mar-03 7:56
Nicholas Naddaf18-Mar-03 7:56 
GeneralRe: Managed and Unmanaged Pin
Nish Nishant18-Mar-03 8:00
sitebuilderNish Nishant18-Mar-03 8:00 
GeneralRe: Managed and Unmanaged Pin
Nicholas Naddaf18-Mar-03 8:05
Nicholas Naddaf18-Mar-03 8:05 
GeneralRe: Managed and Unmanaged Pin
Kannan Kalyanaraman18-Mar-03 22:10
Kannan Kalyanaraman18-Mar-03 22:10 
GeneralRe: Managed and Unmanaged Pin
ManagedCode19-Mar-03 18:35
ManagedCode19-Mar-03 18:35 
GeneralRe: Managed and Unmanaged Pin
Kannan Kalyanaraman19-Mar-03 20:03
Kannan Kalyanaraman19-Mar-03 20:03 
QuestionPredefined bitmaps for toolbars ? Pin
Maximilien17-Mar-03 14:49
Maximilien17-Mar-03 14:49 
AnswerRe: Predefined bitmaps for toolbars ? Pin
Heath Stewart17-Mar-03 17:02
protectorHeath Stewart17-Mar-03 17:02 
GeneralRe: Predefined bitmaps for toolbars ? Pin
Maximilien18-Mar-03 11:55
Maximilien18-Mar-03 11:55 
GeneralRe: Predefined bitmaps for toolbars ? Pin
Heath Stewart18-Mar-03 17:03
protectorHeath Stewart18-Mar-03 17:03 
GeneralC# DLL in VC++ Pin
Baatezu14-Mar-03 19:38
Baatezu14-Mar-03 19:38 
GeneralRe: C# DLL in VC++ Pin
Paul Selormey14-Mar-03 23:46
Paul Selormey14-Mar-03 23:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.