#using <mscorlib.dll>
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>
using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;
__gc public class SimpleForm : public Form
{
public:
SimpleForm();
private:
Panel *pnlRectangle;
};
SimpleForm::SimpleForm()
{
this->Text = S"Panel Control Example";
pnlRectangle = new Panel;
pnlRectangle->Location = Point(8, 16);
pnlRectangle->Size = Drawing::Size(220, 108);
pnlRectangle->BorderStyle = BorderStyle::Fixed3D;
this->Controls->Add(pnlRectangle);
}
int __stdcall WinMain()
{
SimpleForm *FM = new SimpleForm;
Application::Run(FM);
return 0;
}
|