form1.h
来自「Visual_C++.NET实用编程百例」· C头文件 代码 · 共 130 行
H
130 行
#pragma once
namespace cover
{
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::PictureBox * pictureBox1;
private: System::Windows::Forms::Label * label1;
private: System::Windows::Forms::Timer * timer1;
private: System::Windows::Forms::Label * label2;
private: System::ComponentModel::IContainer * components;
private:
/// <summary>
/// 必需的设计器变量。
/// </summary>
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
void InitializeComponent(void)
{
this->components = new System::ComponentModel::Container();
System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(cover::Form1));
this->pictureBox1 = new System::Windows::Forms::PictureBox();
this->label1 = new System::Windows::Forms::Label();
this->timer1 = new System::Windows::Forms::Timer(this->components);
this->label2 = new System::Windows::Forms::Label();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->Image = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(0, 0);
this->pictureBox1->Name = S"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(360, 200);
this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox1->TabIndex = 0;
this->pictureBox1->TabStop = false;
//
// label1
//
this->label1->BackColor = System::Drawing::SystemColors::ActiveCaptionText;
this->label1->Font = new System::Drawing::Font(S"宋体", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, (System::Byte)134);
this->label1->Location = System::Drawing::Point(24, 216);
this->label1->Name = S"label1";
this->label1->Size = System::Drawing::Size(216, 23);
this->label1->TabIndex = 1;
this->label1->Text = S"欢迎使用安全管理系统";
//
// timer1
//
this->timer1->Interval = 10000;
this->timer1->Tick += new System::EventHandler(this, timer1_Tick);
//
// label2
//
this->label2->Location = System::Drawing::Point(232, 240);
this->label2->Name = S"label2";
this->label2->Size = System::Drawing::Size(112, 16);
this->label2->TabIndex = 2;
this->label2->Text = S"CooyRight(C)2004";
//
// Form1
//
this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
this->BackColor = System::Drawing::SystemColors::Control;
this->ClientSize = System::Drawing::Size(360, 266);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->pictureBox1);
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;
this->Name = S"Form1";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = S"Form1";
this->Load += new System::EventHandler(this, Form1_Load);
this->ResumeLayout(false);
}
private: System::Void timer1_Tick(System::Object * sender, System::EventArgs * e)
{
timer1->Enabled = false;
this->Close ();
}
private: System::Void Form1_Load(System::Object * sender, System::EventArgs * e)
{
timer1->Enabled =true;
timer1->Interval =10000;
}
};
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?