⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.h

📁 数据库开发
💻 H
📖 第 1 页 / 共 3 页
字号:
#pragma once


namespace VCDotnet
{
	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace System::IO;
	using namespace System::Drawing::Drawing2D;  

using namespace System::Diagnostics;
using namespace System::ComponentModel;

	/// <summary> 
	/// Form1 摘要
	///
	/// 警告: 如果您更改该类的名称,则需要更改 
	///          与该类所依赖的所有 .resx 文件关联的托管资源编译器工具的 
	///          “资源文件名”属性。  否则,
	///          设计器将不能与此窗体关联的
	///          本地化资源正确交互。
	/// </summary>
	public __gc class Form1 : public System::Windows::Forms::Form
	{	
	public:
	private: System::Windows::Forms::TabPage *  tabPage3;
	private: System::Windows::Forms::ListView *  listView2;
	private: System::Windows::Forms::Timer *  timer1;

	private: System::IO::FileSystemWatcher *  fileSystemWatcher1;
	private: System::Windows::Forms::Label *  label1;






	private: System::Windows::Forms::DataGrid *  dataGrid1;
	private: System::Data::OleDb::OleDbConnection *  oleDbConnection1;
	private: System::Data::OleDb::OleDbDataAdapter *  oleDbDataAdapter1;
	private: System::Data::OleDb::OleDbCommand *  oleDbSelectCommand1;
	private: System::Data::OleDb::OleDbCommand *  oleDbInsertCommand1;
	private: System::Data::OleDb::OleDbCommand *  oleDbUpdateCommand1;
	private: System::Data::OleDb::OleDbCommand *  oleDbDeleteCommand1;

	private: VCDotnet::DataSet1 *  dataSet1;


	public:

        //声明数组用来存储ListBox中画各列表项使用的画刷
		static Brush* listBoxBrushes[]={Brushes::Black, Brushes::Black,
				Brushes::Black,Brushes::Black,Brushes::Black};
			 //声明并初始化数组保存预定义的ListBox各列表项的高度
		static Int32 listBoxHeights[]={30,30,30,30,30};
		Form1(void)
		{
			InitializeComponent();

			listBoxHeights[0]=30;
			listBoxHeights[1]=30;
			listBoxHeights[2]=30;
			listBoxHeights[3]=30;
			listBoxHeights[4]=30;

	        Image* bkImage = new Bitmap("1.bmp");
			//创建brush,将使用它画ListBox中第一个列表项的背景
			Brush* bkBrush =new TextureBrush(bkImage);
			
			//创建一个渐变色的画刷,将使用它画第三个列表项的背景
			Rectangle r;
			r=Rectangle(0, 0, listBox1->Width, 100);
			LinearGradientBrush* lb =new LinearGradientBrush(r, Color::Red, Color::Yellow, LinearGradientMode::Horizontal);

	        //创建将要使用的Brush类的数组listBoxBrushes()
			//其中包含了自定义的backgroundBrush、lb
			//系统定义的Brush中的LemonChiffon、PeachPuff、BlanchedAlmond
			listBoxBrushes[0]=bkBrush;
			listBoxBrushes[1]=Brushes::LemonChiffon;
			listBoxBrushes[2]=lb;
			listBoxBrushes[3]=Brushes::PeachPuff;
			listBoxBrushes[4]=Brushes::BlanchedAlmond;
		}
  
	protected:
		void Dispose(Boolean disposing)
		{
			if (disposing && components)
			{
				components->Dispose();
			}
			__super::Dispose(disposing);
		}


	private: System::Windows::Forms::OpenFileDialog *  openFileDialog1;
	private: System::Windows::Forms::TabControl *  tabControl1;
	private: System::Windows::Forms::TabPage *  tabPage1;
	private: System::Windows::Forms::TabPage *  tabPage2;
	private: System::Windows::Forms::Button *  btnOpenGIF;
	private: System::Windows::Forms::PictureBox *  picGIF;
	private: System::Windows::Forms::RichTextBox *  richTextBox1;
	private: System::Windows::Forms::TreeView *  treeView1;
	private: System::Windows::Forms::ListView *  listView1;
	private: System::Windows::Forms::ListBox *  listBox1;
	private: System::ComponentModel::IContainer *  components;




	private:
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>


		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		void InitializeComponent(void)
		{
			this->components = new System::ComponentModel::Container();
			this->openFileDialog1 = new System::Windows::Forms::OpenFileDialog();
			this->tabControl1 = new System::Windows::Forms::TabControl();
			this->tabPage1 = new System::Windows::Forms::TabPage();
			this->listBox1 = new System::Windows::Forms::ListBox();
			this->listView1 = new System::Windows::Forms::ListView();
			this->treeView1 = new System::Windows::Forms::TreeView();
			this->richTextBox1 = new System::Windows::Forms::RichTextBox();
			this->btnOpenGIF = new System::Windows::Forms::Button();
			this->picGIF = new System::Windows::Forms::PictureBox();
			this->tabPage2 = new System::Windows::Forms::TabPage();
			this->label1 = new System::Windows::Forms::Label();
			this->listView2 = new System::Windows::Forms::ListView();
			this->tabPage3 = new System::Windows::Forms::TabPage();
			this->dataGrid1 = new System::Windows::Forms::DataGrid();
			this->dataSet1 = new VCDotnet::DataSet1();
			this->timer1 = new System::Windows::Forms::Timer(this->components);
			this->fileSystemWatcher1 = new System::IO::FileSystemWatcher();
			this->oleDbConnection1 = new System::Data::OleDb::OleDbConnection();
			this->oleDbDataAdapter1 = new System::Data::OleDb::OleDbDataAdapter();
			this->oleDbDeleteCommand1 = new System::Data::OleDb::OleDbCommand();
			this->oleDbInsertCommand1 = new System::Data::OleDb::OleDbCommand();
			this->oleDbSelectCommand1 = new System::Data::OleDb::OleDbCommand();
			this->oleDbUpdateCommand1 = new System::Data::OleDb::OleDbCommand();
			this->tabControl1->SuspendLayout();
			this->tabPage1->SuspendLayout();
			this->tabPage2->SuspendLayout();
			this->tabPage3->SuspendLayout();
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dataGrid1))->BeginInit();
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dataSet1))->BeginInit();
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->fileSystemWatcher1))->BeginInit();
			this->SuspendLayout();
			// 
			// tabControl1
			// 
			this->tabControl1->Controls->Add(this->tabPage1);
			this->tabControl1->Controls->Add(this->tabPage2);
			this->tabControl1->Controls->Add(this->tabPage3);
			this->tabControl1->Location = System::Drawing::Point(6, 6);
			this->tabControl1->Name = S"tabControl1";
			this->tabControl1->SelectedIndex = 0;
			this->tabControl1->Size = System::Drawing::Size(480, 318);
			this->tabControl1->TabIndex = 2;
			// 
			// tabPage1
			// 
			this->tabPage1->Controls->Add(this->listBox1);
			this->tabPage1->Controls->Add(this->listView1);
			this->tabPage1->Controls->Add(this->treeView1);
			this->tabPage1->Controls->Add(this->richTextBox1);
			this->tabPage1->Controls->Add(this->btnOpenGIF);
			this->tabPage1->Controls->Add(this->picGIF);
			this->tabPage1->Location = System::Drawing::Point(4, 21);
			this->tabPage1->Name = S"tabPage1";
			this->tabPage1->Size = System::Drawing::Size(472, 293);
			this->tabPage1->TabIndex = 0;
			this->tabPage1->Text = S"Windows窗体";
			// 
			// listBox1
			// 
			this->listBox1->DrawMode = System::Windows::Forms::DrawMode::OwnerDrawVariable;
			System::Object* __mcTemp__1[] = new System::Object*[5];
			__mcTemp__1[0] = S"1";
			__mcTemp__1[1] = S"2";
			__mcTemp__1[2] = S"3";
			__mcTemp__1[3] = S"4";
			__mcTemp__1[4] = S"5";
			this->listBox1->Items->AddRange(__mcTemp__1);
			this->listBox1->Location = System::Drawing::Point(6, 12);
			this->listBox1->Name = S"listBox1";
			this->listBox1->Size = System::Drawing::Size(126, 144);
			this->listBox1->TabIndex = 7;
			this->listBox1->MeasureItem += new System::Windows::Forms::MeasureItemEventHandler(this, listBox1_MeasureItem);
			this->listBox1->DrawItem += new System::Windows::Forms::DrawItemEventHandler(this, listBox1_DrawItem);
			// 
			// listView1
			// 
			this->listView1->Location = System::Drawing::Point(138, 162);
			this->listView1->Name = S"listView1";
			this->listView1->Size = System::Drawing::Size(330, 124);
			this->listView1->TabIndex = 6;
			// 
			// treeView1
			// 
			this->treeView1->ImageIndex = -1;
			this->treeView1->Location = System::Drawing::Point(6, 162);
			this->treeView1->Name = S"treeView1";
			this->treeView1->SelectedImageIndex = -1;

⌨️ 快捷键说明

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