資源簡介
這個程序是我自己搜索了很多資源后自己編寫成功的,因為現在網站上沒有這種現成的程序,包括winform連接access數據庫,用winform程序接收串口數據,以及勇接受的的數據產生波形圖。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.OleDb;
namespace?WindowsFormsApplication1
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?dataGridView1_CellContentClick(object?sender?DataGridViewCellEventArgs?e)
????????{
????????}
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
???????????
????????????OleDbConnectionStringBuilder?odstr?=?new?OleDbConnectionStringBuilder();
????????????odstr.Provider?=?“Microsoft.Jet.OLEDB.4.0“;
????????????odstr.DataSource?=?@“G:\WinForm\數據庫\db1.mdb“;
????????????OleDbConnection?olcn?=?new?OleDbConnection(odstr.ConnectionString);
????????????olcn.Open();
????????????string?sql?=?“select?*?from?student?where?name=‘12‘“;
????????????OleDbDataAdapter?olda?=?new?OleDbDataAdapter(sql?olcn);
????????????DataSet?ds?=?new?DataSet();
????????????olda.Fill(ds?“student“);
????????????this.dataGridView1.DataSource?=?ds.Tables[“student“];
????????}
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????//Response.Redirect(“result.aspx“);
????????????//Server.Transfer(“result.aspx“);
????????????Form2?form2?=?new?Form2();????????????//?Form2為跳轉頁面的窗體名稱
????????????form2.ShowDialog();
????????????//Form1?form1?=?new?Form1();
????????????//form1.Close();
????????????//this.Close();
???????????//?Application.Exit?();//關閉所有窗體。
????????????
????????}
????????private?void?button3_Click(object?sender?EventArgs?e)
????????{
????????????this.Hide();
????????}
????????private?void?button4_Click(object?sender?EventArgs?e)
????????{
????????????Form3?form3?=?new?Form3();
????????????form3.Show();
????????????this.Hide();
????????}
????????private?void?button5_Click(object?sender?EventArgs?e)
????????{
????????????Form5?form5?=?new?Form5();
????????????form5.ShowDialog();
????????}
????????private?void?button6_Click(object?sender?EventArgs?e)
????????{
????????????Form6?form6?=?new?Form6();
????????????form6.Show();
????????}
????????private?void?button7_Click(object?sender?EventArgs?e)
????????{
????????????Form7?form7?=?new?Form7();
????????????form7.Show();
????????}
????????private?void?button8_Click(object?sender?EventArgs?e)
????????{
????????????Form8?form8?=?new?Form8();
????????????form8.Show();
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????}
????????private?void?button9_Click(object?sender?EventArgs?e)
????????{
????????????Form9?form9?=?new?Form9();
????????????form9.Show();
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????413696??2013-09-26?22:11??WindowsFormsApplication1\db1.mdb
?????文件?????372736??2003-08-04?09:49??WindowsFormsApplication1\NTGraph.ocx
?????文件??????22016??2013-09-27?18:00??WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\AxInterop.NTGRAPHLib.dll
?????文件?????413696??2013-09-26?22:11??WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\db1.mdb.mdb
?????文件??????22016??2013-09-27?18:00??WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Interop.NTGRAPHLib.dll
?????文件??????33280??2013-10-03?14:06??WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
?????文件??????89600??2013-10-03?14:06??WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
?????文件??????11600??2013-10-03?14:09??WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
?????文件????????490??2010-03-17?22:39??WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
?????文件???????2893??2013-10-02?21:40??WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
?????文件???????9622??2013-10-01?22:16??WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
?????文件???????5817??2013-10-01?22:16??WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
?????文件????????529??2013-09-28?00:03??WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs
?????文件???????3152??2013-09-28?00:03??WindowsFormsApplication1\WindowsFormsApplication1\Form2.Designer.cs
?????文件???????6929??2013-09-28?00:03??WindowsFormsApplication1\WindowsFormsApplication1\Form2.resx
?????文件???????3020??2013-09-28?17:30??WindowsFormsApplication1\WindowsFormsApplication1\Form3.cs
?????文件???????5535??2013-09-28?17:29??WindowsFormsApplication1\WindowsFormsApplication1\Form3.Designer.cs
?????文件???????5817??2013-09-28?17:29??WindowsFormsApplication1\WindowsFormsApplication1\Form3.resx
?????文件??????11382??2013-09-28?20:07??WindowsFormsApplication1\WindowsFormsApplication1\Form4.cs
?????文件???????2069??2013-09-28?19:33??WindowsFormsApplication1\WindowsFormsApplication1\Form4.Designer.cs
?????文件???????5817??2013-09-28?19:33??WindowsFormsApplication1\WindowsFormsApplication1\Form4.resx
?????文件???????3358??2013-09-28?19:28??WindowsFormsApplication1\WindowsFormsApplication1\Form5.cs
?????文件???????2205??2013-09-28?19:25??WindowsFormsApplication1\WindowsFormsApplication1\Form5.Designer.cs
?????文件???????5817??2013-09-28?19:25??WindowsFormsApplication1\WindowsFormsApplication1\Form5.resx
?????文件???????2077??2013-09-28?21:16??WindowsFormsApplication1\WindowsFormsApplication1\Form6.cs
?????文件???????1578??2013-09-28?20:57??WindowsFormsApplication1\WindowsFormsApplication1\Form6.Designer.cs
?????文件???????5817??2013-09-28?20:57??WindowsFormsApplication1\WindowsFormsApplication1\Form6.resx
?????文件???????1732??2013-10-01?11:23??WindowsFormsApplication1\WindowsFormsApplication1\Form7.cs
?????文件???????1578??2013-09-28?21:25??WindowsFormsApplication1\WindowsFormsApplication1\Form7.Designer.cs
?????文件???????5817??2013-09-28?21:25??WindowsFormsApplication1\WindowsFormsApplication1\Form7.resx
............此處省略48個文件信息
- 上一篇:C#調用金蝶登錄窗口專業版12.2以后也可以
- 下一篇:wpf高性能畫圖
評論
共有 條評論