form1.h

来自「Visual_C++.NET实用编程百例」· C头文件 代码 · 共 93 行

H
93
字号
#pragma once


namespace Hello
{
	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 __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::Label *  label1;


	private:
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		System::ComponentModel::Container * components;

		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		void InitializeComponent(void)
		{
			this->label1 = new System::Windows::Forms::Label();
			this->SuspendLayout();
			// 
			// label1
			// 
			this->label1->Font = new System::Drawing::Font(S"宋体", 20);
			this->label1->Location = System::Drawing::Point(24, 32);
			this->label1->Name = S"label1";
			this->label1->Size = System::Drawing::Size(248, 32);
			this->label1->TabIndex = 0;
			this->label1->Text = S"Hello,VC++ .NET!";
			this->label1->Click += new System::EventHandler(this, label1_Click_1);
			// 
			// Form1
			// 
			this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
			this->ClientSize = System::Drawing::Size(296, 102);
			this->Controls->Add(this->label1);
			this->Name = S"Form1";
			this->Text = S"Form1";
			this->Load += new System::EventHandler(this, Form1_Load);
			this->ResumeLayout(false);

		}	
	private: System::Void label1_Click(System::Object *  sender, System::EventArgs *  e)
			 {			 }

	private: System::Void Form1_Load(System::Object *  sender, System::EventArgs *  e)
			 {
			 }

	private: System::Void label1_Click_1(System::Object *  sender, System::EventArgs *  e)
			 {
			 }

	};
}


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?