📄 form1.h
字号:
#pragma once
namespace Example {
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>
/// Form1 摘要
///
/// 警告: 如果更改此类的名称,则需要更改
/// 与此类所依赖的所有 .resx 文件关联的托管资源编译器工具的
/// “资源文件名”属性。否则,
/// 设计器将不能与此窗体的关联
/// 本地化资源正确交互。
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: 在此处添加构造函数代码
//
}
protected:
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel1;
protected:
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::Button^ button3;
private: System::Windows::Forms::Button^ button4;
private: System::Windows::Forms::Button^ button5;
private: System::Windows::Forms::Button^ button6;
private: System::Windows::Forms::Button^ button7;
private: System::Windows::Forms::Button^ button8;
private: System::Windows::Forms::Button^ button9;
private:
/// <summary>
/// 必需的设计器变量。
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->flowLayoutPanel1 = (gcnew System::Windows::Forms::FlowLayoutPanel());
this->button1 = (gcnew System::Windows::Forms::Button());
this->button2 = (gcnew System::Windows::Forms::Button());
this->button3 = (gcnew System::Windows::Forms::Button());
this->button4 = (gcnew System::Windows::Forms::Button());
this->button5 = (gcnew System::Windows::Forms::Button());
this->button6 = (gcnew System::Windows::Forms::Button());
this->button7 = (gcnew System::Windows::Forms::Button());
this->button8 = (gcnew System::Windows::Forms::Button());
this->button9 = (gcnew System::Windows::Forms::Button());
this->flowLayoutPanel1->SuspendLayout();
this->SuspendLayout();
//
// flowLayoutPanel1
//
this->flowLayoutPanel1->Controls->Add(this->button1);
this->flowLayoutPanel1->Controls->Add(this->button2);
this->flowLayoutPanel1->Controls->Add(this->button3);
this->flowLayoutPanel1->Controls->Add(this->button4);
this->flowLayoutPanel1->Controls->Add(this->button5);
this->flowLayoutPanel1->Controls->Add(this->button6);
this->flowLayoutPanel1->Controls->Add(this->button7);
this->flowLayoutPanel1->Controls->Add(this->button8);
this->flowLayoutPanel1->Controls->Add(this->button9);
this->flowLayoutPanel1->Dock = System::Windows::Forms::DockStyle::Fill;
this->flowLayoutPanel1->Location = System::Drawing::Point(0, 0);
this->flowLayoutPanel1->Name = L"flowLayoutPanel1";
this->flowLayoutPanel1->Size = System::Drawing::Size(390, 214);
this->flowLayoutPanel1->TabIndex = 0;
//
// button1
//
this->button1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button1.Image")));
this->button1->Location = System::Drawing::Point(3, 3);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(100, 58);
this->button1->TabIndex = 0;
this->button1->UseVisualStyleBackColor = true;
//
// button2
//
this->button2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button2.Image")));
this->button2->Location = System::Drawing::Point(109, 3);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(100, 58);
this->button2->TabIndex = 1;
this->button2->UseVisualStyleBackColor = true;
//
// button3
//
this->button3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button3.Image")));
this->button3->Location = System::Drawing::Point(215, 3);
this->button3->Name = L"button3";
this->button3->Size = System::Drawing::Size(100, 58);
this->button3->TabIndex = 2;
this->button3->UseVisualStyleBackColor = true;
//
// button4
//
this->button4->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button4.Image")));
this->button4->Location = System::Drawing::Point(3, 67);
this->button4->Name = L"button4";
this->button4->Size = System::Drawing::Size(100, 58);
this->button4->TabIndex = 3;
this->button4->UseVisualStyleBackColor = true;
//
// button5
//
this->button5->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button5.Image")));
this->button5->Location = System::Drawing::Point(109, 67);
this->button5->Name = L"button5";
this->button5->Size = System::Drawing::Size(100, 58);
this->button5->TabIndex = 4;
this->button5->UseVisualStyleBackColor = true;
//
// button6
//
this->button6->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button6.Image")));
this->button6->Location = System::Drawing::Point(215, 67);
this->button6->Name = L"button6";
this->button6->Size = System::Drawing::Size(100, 58);
this->button6->TabIndex = 5;
this->button6->UseVisualStyleBackColor = true;
//
// button7
//
this->button7->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button7.Image")));
this->button7->Location = System::Drawing::Point(3, 131);
this->button7->Name = L"button7";
this->button7->Size = System::Drawing::Size(100, 58);
this->button7->TabIndex = 6;
this->button7->UseVisualStyleBackColor = true;
//
// button8
//
this->button8->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button8.Image")));
this->button8->Location = System::Drawing::Point(109, 131);
this->button8->Name = L"button8";
this->button8->Size = System::Drawing::Size(100, 58);
this->button8->TabIndex = 7;
this->button8->UseVisualStyleBackColor = true;
//
// button9
//
this->button9->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"button9.Image")));
this->button9->Location = System::Drawing::Point(215, 131);
this->button9->Name = L"button9";
this->button9->Size = System::Drawing::Size(100, 58);
this->button9->TabIndex = 8;
this->button9->UseVisualStyleBackColor = true;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(390, 214);
this->Controls->Add(this->flowLayoutPanel1);
this->Name = L"Form1";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = L"演示根据窗体大小排列控件";
this->flowLayoutPanel1->ResumeLayout(false);
this->ResumeLayout(false);
}
#pragma endregion
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -