[2004-8-4] VB.NET learning notes, use the ADO.NET object to access the database, write the result to listview

zhaozj2021-02-16  111

Public class form1 ??? inherits system.windows.Forms.Form

#Region "Windows Form Designer Generated Code"

??? public sub new () ??????? mybase.new ()

??????? 'This call is required for the Windows Form Designer. ??????? InitializeComponent ()

??????? 'Add any initialization after INITIALIZECOMPONENT () call

??? End Sub

??? 'Form rewriting disposal to clean the component list. ??? protected overloads overrides sub dispose (byval disposing as boolean) ??????? if disposing the ??????????? if not (Components Is Nothing) THEN ??????? ????????????????????? End if ??????? end if ??????? mybase.dispose (Disposing) ?? ? End Sub

??? 'Windows Form Designer Needly ??? Private Components as System.comPonentModel.icontainer

??? 'Note: The following procedure is necessary for the Windows Form Designer to modify this process using the Windows Form Designer. ?? 'Don't modify it using the code editor. ??? Friend WithEvents Button1 As System.Windows.Forms.Button ??? Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection ??? Friend WithEvents OleDbCommand1 As System.Data.OleDb.OleDbCommand ??? Friend WithEvents ListView1 As System .Windows.Forms.listview

???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Private subinitializeComponent ()

??????? me.button1 = new system.windows.Forms.Button ()

??????? me.oledbconnection1 = new system.data.oledb.oledbConnection ()

??????? me.oledbcommand1 = new system.data.oledb.OleDbcommand ()

??????? me.listview1 = new system.windows.Forms.listView ()

??????? me.suspendlayout ()

??????? '

??????? 'button1

??????? '

??????? me.button1.location = new system.drawing.point (296, 256)

??????? me.button1.name = "button1"

??????? me.button1.size = new system.drawing.size (80, 24)

??????? me.button1.tabindex = 1

??????? me.button1.text = "Read (& R)"

??????? '

??????? 'ListView1

??????? '

??????? me.listview1.location = new system.drawing.point (8, 8) ??????? me.listview1.name = "listview1"

??????? me.listview1.size = new system.drawing.size (384, 224)

??????? me.listview1.tabindex = 2

??????? '

??????? 'Form1

??????? '

??????? me.autoscalebasesize = new system.drawing.size (6, 14)

??????? me.clientsize = new system.drawing.size (408, 293)

??????? me.controls.addrange (new system.windows.forms.control () {me.listview1, me.button1})

??????? me.name = "form1"

??????? me.text = "form1"

??????? me.ResumeLayout (false)

??? End Sub

#End region

转载请注明原文地址:https://www.9cbs.com/read-10302.html

New Post(0)