Нетривиальный пример работы с базами данных в VB.NET (часть 1)
Private WithEvents Label1 As System.Windows.Forms.Label Private WithEvents Label2 As System.Windows.Forms.Label Private WithEvents Label3 As System.Windows.Forms.Label Private WithEvents Label4 As System.Windows.Forms.Label Private WithEvents btnConnect As System.Windows.Forms.Button Private WithEvents txtUID As System.Windows.Forms.TextBox Private WithEvents txtPassword As System.Windows.Forms.TextBox Private WithEvents txtDatabase As System.Windows.Forms.TextBox Private WithEvents txtServer As System.Windows.Forms.TextBox ' Необходимо для работы дизайнера форм Windows Private components As System.ComponentModel.Container ' ВНИМАНИЕ: следующий фрагмент необходим для дизайнера форм Windows ' Для его модификации следует использовать дизайнер форм. ' Не изменяйте его в редакторе! <System.Diagnostics.DebuggerStepThrough()> Private Sub _ Initial izeComponent() Me.Label4 = New System.Windows.Forms.Label () Me.txtPassword = New System.Windows.Forms.TextBox() Me.Label 1 = New System.Windows.Forms.Label () Me.txtServer = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label () Me.Labels = New System.Windows.Forms.Label () Me.txtUID – New System.Windows.Forms.TextBox() Me.txtDatabase = New System.Windows.Forms.TextBox() Me.btnConnect = New System.Windows.forms.Button() Me.SuspendLayout() 'Label4 Me.Label4.Location = New System.Drawing.Point(24.176) Me.Label 4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(82.19) Me.Label4.TabIndex = 0 Me.Label4.Text = "Password:" Me.Label4.TextAlign = System.Drawi ng.ContentAlignment.MiddleRight 'txtPassword Me.txtPassword.Location = New System.Drawing.Point(168.168) Me..txtPassword. Name = "txtPassword" Me.txtPassword.PasswordChar = ChrW(42) Me.txtPassword.Size = New System.Drawing.Size(205.22) Me.txtPassword.Tablndex = 3 Me.txtPassword.Text = "" 'Label 1 Me.Label 1.Location = New System.Drawing.Point(24. 32) Me.Label 1.Name = "Label1" Me.Label 1.Size = New System.Drawing.SizeC82. 20) Me.Label 1.Tablndex =0 Me.Label 1.Text = "Server:" Me.Label 1.TextAli gn = System.Drawi ng.ContentAlignment.Mi ddleRight 'txtServer Me.txtServer.Location – New System.Drawing.Point(168, 24} Me.txtServer.Name = "txtServer" Me.txtServer.Size = New System.Drawing.Size(205. 22) Me.txtServer.Tablndex = 0 Me.txtServer.Text = "" 'Label 2 Me.Label2.Location = New System.Drawing.Point(24. 80) Me.Label 2.Name = "Label 2" Me.Label2.Size = New System.Drawing.Size(82, 20) Me.Label2.Tablndex = 0 Me.Label 2.Text = "Database:" Me.Label 2.TextAlign = System.Drawi ng.ContentAlignment.Mi ddleRight