form1.h
来自「Visual_C++.NET实用编程百例」· C头文件 代码 · 共 270 行 · 第 1/2 页
H
270 行
#pragma once
namespace db
{
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::DataGrid * dataGrid1;
private: System::Data::OleDb::OleDbDataAdapter * oleDbDataAdapter1;
private: System::Data::DataView * dataView1;
private: System::Windows::Forms::Button * button2;
private: System::Windows::Forms::Button * button1;
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: System::Data::OleDb::OleDbConnection * oleDbConnection1;
private: db::DataSet1 * dataSet11;
private:
/// <summary>
/// 必需的设计器变量。
/// </summary>
System::ComponentModel::Container * components;
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
void InitializeComponent(void)
{
this->dataGrid1 = new System::Windows::Forms::DataGrid();
this->dataView1 = new System::Data::DataView();
this->oleDbDataAdapter1 = new System::Data::OleDb::OleDbDataAdapter();
this->button2 = new System::Windows::Forms::Button();
this->button1 = new System::Windows::Forms::Button();
this->oleDbSelectCommand1 = new System::Data::OleDb::OleDbCommand();
this->oleDbInsertCommand1 = new System::Data::OleDb::OleDbCommand();
this->oleDbUpdateCommand1 = new System::Data::OleDb::OleDbCommand();
this->oleDbDeleteCommand1 = new System::Data::OleDb::OleDbCommand();
this->oleDbConnection1 = new System::Data::OleDb::OleDbConnection();
this->dataSet11 = new db::DataSet1();
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dataGrid1))->BeginInit();
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dataView1))->BeginInit();
(__try_cast<System::ComponentModel::ISupportInitialize * >(this->dataSet11))->BeginInit();
this->SuspendLayout();
//
// dataGrid1
//
this->dataGrid1->AlternatingBackColor = System::Drawing::Color::GhostWhite;
this->dataGrid1->BackColor = System::Drawing::Color::GhostWhite;
this->dataGrid1->BackgroundColor = System::Drawing::Color::Lavender;
this->dataGrid1->BorderStyle = System::Windows::Forms::BorderStyle::None;
this->dataGrid1->CaptionBackColor = System::Drawing::Color::RoyalBlue;
this->dataGrid1->CaptionForeColor = System::Drawing::Color::White;
this->dataGrid1->DataMember = S"";
this->dataGrid1->DataSource = this->dataView1;
this->dataGrid1->FlatMode = true;
this->dataGrid1->Font = new System::Drawing::Font(S"Tahoma", 8);
this->dataGrid1->ForeColor = System::Drawing::Color::MidnightBlue;
this->dataGrid1->GridLineColor = System::Drawing::Color::RoyalBlue;
this->dataGrid1->HeaderBackColor = System::Drawing::Color::MidnightBlue;
this->dataGrid1->HeaderFont = new System::Drawing::Font(S"Tahoma", 8, System::Drawing::FontStyle::Bold);
this->dataGrid1->HeaderForeColor = System::Drawing::Color::Lavender;
this->dataGrid1->LinkColor = System::Drawing::Color::Teal;
this->dataGrid1->Location = System::Drawing::Point(24, 16);
this->dataGrid1->Name = S"dataGrid1";
this->dataGrid1->ParentRowsBackColor = System::Drawing::Color::Lavender;
this->dataGrid1->ParentRowsForeColor = System::Drawing::Color::MidnightBlue;
this->dataGrid1->SelectionBackColor = System::Drawing::Color::Teal;
this->dataGrid1->SelectionForeColor = System::Drawing::Color::PaleGreen;
this->dataGrid1->Size = System::Drawing::Size(336, 152);
this->dataGrid1->TabIndex = 0;
//
// dataView1
//
this->dataView1->Table = this->dataSet11->grade;
//
// oleDbDataAdapter1
//
this->oleDbDataAdapter1->DeleteCommand = this->oleDbDeleteCommand1;
this->oleDbDataAdapter1->InsertCommand = this->oleDbInsertCommand1;
this->oleDbDataAdapter1->SelectCommand = this->oleDbSelectCommand1;
System::Data::Common::DataTableMapping* __mcTemp__1[] = new System::Data::Common::DataTableMapping*[1];
System::Data::Common::DataColumnMapping* __mcTemp__2[] = new System::Data::Common::DataColumnMapping*[5];
__mcTemp__2[0] = new System::Data::Common::DataColumnMapping(S"Name", S"Name");
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?