<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class frmStudents Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. <System.Diagnostics.DebuggerNonUserCode()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then components.Dispose() End If Finally MyBase.Dispose(disposing) End Try End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <System.Diagnostics.DebuggerStepThrough()> _ Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.Label1 = New System.Windows.Forms.Label() Me.ListBox1 = New System.Windows.Forms.ListBox() Me.btnShow = New System.Windows.Forms.Button() Me.btnLast = New System.Windows.Forms.Button() Me.btnNext = New System.Windows.Forms.Button() Me.btnPrev = New System.Windows.Forms.Button() Me.btnFirst = New System.Windows.Forms.Button() Me.btnNew = New System.Windows.Forms.Button() Me.btnUpdate = New System.Windows.Forms.Button() Me.btnSave = New System.Windows.Forms.Button() Me.dtpDOB = New System.Windows.Forms.DateTimePicker() Me.txtSName = New System.Windows.Forms.TextBox() Me.txtRollNo = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.txtClass = New System.Windows.Forms.TextBox() Me.btnDelete = New System.Windows.Forms.Button() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.Teal Me.Panel1.Controls.Add(Me.Label1) Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top Me.Panel1.Location = New System.Drawing.Point(0, 0) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(826, 45) Me.Panel1.TabIndex = 0 ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.White Me.Label1.Location = New System.Drawing.Point(136, 10) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(528, 25) Me.Label1.TabIndex = 1 Me.Label1.Text = "STUDENT ENTRY FORM IN VB.NET AND ACCESS 2016" ' 'ListBox1 ' Me.ListBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.ListBox1.FormattingEnabled = True Me.ListBox1.ItemHeight = 20 Me.ListBox1.Location = New System.Drawing.Point(580, 52) Me.ListBox1.Margin = New System.Windows.Forms.Padding(4) Me.ListBox1.Name = "ListBox1" Me.ListBox1.Size = New System.Drawing.Size(233, 284) Me.ListBox1.TabIndex = 28 ' 'btnShow ' Me.btnShow.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnShow.Location = New System.Drawing.Point(580, 344) Me.btnShow.Margin = New System.Windows.Forms.Padding(4) Me.btnShow.Name = "btnShow" Me.btnShow.Size = New System.Drawing.Size(233, 61) Me.btnShow.TabIndex = 27 Me.btnShow.Text = "Show Data" Me.btnShow.UseVisualStyleBackColor = True ' 'btnLast ' Me.btnLast.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnLast.Location = New System.Drawing.Point(433, 353) Me.btnLast.Margin = New System.Windows.Forms.Padding(4) Me.btnLast.Name = "btnLast" Me.btnLast.Size = New System.Drawing.Size(133, 61) Me.btnLast.TabIndex = 26 Me.btnLast.Text = ">>" Me.btnLast.UseVisualStyleBackColor = True ' 'btnNext ' Me.btnNext.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnNext.Location = New System.Drawing.Point(296, 353) Me.btnNext.Margin = New System.Windows.Forms.Padding(4) Me.btnNext.Name = "btnNext" Me.btnNext.Size = New System.Drawing.Size(133, 61) Me.btnNext.TabIndex = 25 Me.btnNext.Text = ">" Me.btnNext.UseVisualStyleBackColor = True ' 'btnPrev ' Me.btnPrev.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnPrev.Location = New System.Drawing.Point(155, 353) Me.btnPrev.Margin = New System.Windows.Forms.Padding(4) Me.btnPrev.Name = "btnPrev" Me.btnPrev.Size = New System.Drawing.Size(133, 61) Me.btnPrev.TabIndex = 24 Me.btnPrev.Text = "<" Me.btnPrev.UseVisualStyleBackColor = True ' 'btnFirst ' Me.btnFirst.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnFirst.Location = New System.Drawing.Point(13, 353) Me.btnFirst.Margin = New System.Windows.Forms.Padding(4) Me.btnFirst.Name = "btnFirst" Me.btnFirst.Size = New System.Drawing.Size(133, 61) Me.btnFirst.TabIndex = 23 Me.btnFirst.Text = "<<" Me.btnFirst.UseVisualStyleBackColor = True ' 'btnNew ' Me.btnNew.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnNew.Location = New System.Drawing.Point(433, 284) Me.btnNew.Margin = New System.Windows.Forms.Padding(4) Me.btnNew.Name = "btnNew" Me.btnNew.Size = New System.Drawing.Size(133, 61) Me.btnNew.TabIndex = 21 Me.btnNew.Text = "New" Me.btnNew.UseVisualStyleBackColor = True ' 'btnUpdate ' Me.btnUpdate.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnUpdate.Location = New System.Drawing.Point(155, 284) Me.btnUpdate.Margin = New System.Windows.Forms.Padding(4) Me.btnUpdate.Name = "btnUpdate" Me.btnUpdate.Size = New System.Drawing.Size(133, 61) Me.btnUpdate.TabIndex = 22 Me.btnUpdate.Text = "Update" Me.btnUpdate.UseVisualStyleBackColor = True ' 'btnSave ' Me.btnSave.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnSave.Location = New System.Drawing.Point(13, 284) Me.btnSave.Margin = New System.Windows.Forms.Padding(4) Me.btnSave.Name = "btnSave" Me.btnSave.Size = New System.Drawing.Size(133, 61) Me.btnSave.TabIndex = 20 Me.btnSave.Text = "Save" Me.btnSave.UseVisualStyleBackColor = True ' 'dtpDOB ' Me.dtpDOB.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.dtpDOB.Location = New System.Drawing.Point(155, 233) Me.dtpDOB.Margin = New System.Windows.Forms.Padding(4) Me.dtpDOB.Name = "dtpDOB" Me.dtpDOB.Size = New System.Drawing.Size(249, 27) Me.dtpDOB.TabIndex = 19 ' 'txtSName ' Me.txtSName.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtSName.Location = New System.Drawing.Point(155, 123) Me.txtSName.Margin = New System.Windows.Forms.Padding(4) Me.txtSName.Name = "txtSName" Me.txtSName.Size = New System.Drawing.Size(288, 27) Me.txtSName.TabIndex = 17 ' 'txtRollNo ' Me.txtRollNo.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtRollNo.Location = New System.Drawing.Point(155, 68) Me.txtRollNo.Margin = New System.Windows.Forms.Padding(4) Me.txtRollNo.Name = "txtRollNo" Me.txtRollNo.Size = New System.Drawing.Size(124, 27) Me.txtRollNo.TabIndex = 16 ' 'Label4 ' Me.Label4.AutoSize = True Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.Location = New System.Drawing.Point(9, 240) Me.Label4.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(105, 20) Me.Label4.TabIndex = 15 Me.Label4.Text = "Date of Birth" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.Location = New System.Drawing.Point(9, 182) Me.Label3.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(52, 20) Me.Label3.TabIndex = 14 Me.Label3.Text = "Class" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.Location = New System.Drawing.Point(9, 126) Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(115, 20) Me.Label2.TabIndex = 13 Me.Label2.Text = "Student Name" ' 'Label5 ' Me.Label5.AutoSize = True Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.Location = New System.Drawing.Point(9, 71) Me.Label5.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(64, 20) Me.Label5.TabIndex = 12 Me.Label5.Text = "Roll No" ' 'txtClass ' Me.txtClass.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtClass.Location = New System.Drawing.Point(155, 175) Me.txtClass.Margin = New System.Windows.Forms.Padding(4) Me.txtClass.Name = "txtClass" Me.txtClass.Size = New System.Drawing.Size(288, 27) Me.txtClass.TabIndex = 17 ' 'btnDelete ' Me.btnDelete.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.2!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btnDelete.Location = New System.Drawing.Point(296, 284) Me.btnDelete.Margin = New System.Windows.Forms.Padding(4) Me.btnDelete.Name = "btnDelete" Me.btnDelete.Size = New System.Drawing.Size(133, 61) Me.btnDelete.TabIndex = 29 Me.btnDelete.Text = "Delete" Me.btnDelete.UseVisualStyleBackColor = True ' 'frmStudents ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(128, Byte), Integer)) Me.ClientSize = New System.Drawing.Size(826, 450) Me.Controls.Add(Me.btnDelete) Me.Controls.Add(Me.ListBox1) Me.Controls.Add(Me.btnShow) Me.Controls.Add(Me.btnLast) Me.Controls.Add(Me.btnNext) Me.Controls.Add(Me.btnPrev) Me.Controls.Add(Me.btnFirst) Me.Controls.Add(Me.btnNew) Me.Controls.Add(Me.btnUpdate) Me.Controls.Add(Me.btnSave) Me.Controls.Add(Me.dtpDOB) Me.Controls.Add(Me.txtClass) Me.Controls.Add(Me.txtSName) Me.Controls.Add(Me.txtRollNo) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label5) Me.Controls.Add(Me.Panel1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.MaximizeBox = False Me.Name = "frmStudents" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Student Management System" Me.Panel1.ResumeLayout(False) Me.Panel1.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents Panel1 As Panel Friend WithEvents Label1 As Label Friend WithEvents ListBox1 As ListBox Friend WithEvents btnShow As Button Friend WithEvents btnLast As Button Friend WithEvents btnNext As Button Friend WithEvents btnPrev As Button Friend WithEvents btnFirst As Button Friend WithEvents btnNew As Button Friend WithEvents btnUpdate As Button Friend WithEvents btnSave As Button Friend WithEvents dtpDOB As DateTimePicker Friend WithEvents txtSName As TextBox Friend WithEvents txtRollNo As TextBox Friend WithEvents Label4 As Label Friend WithEvents Label3 As Label Friend WithEvents Label2 As Label Friend WithEvents Label5 As Label Friend WithEvents txtClass As TextBox Friend WithEvents btnDelete As Button End Class
Write, Run & Share VB.net code online using OneCompiler's VB.net online compiler for free. It's one of the robust, feature-rich online compilers for VB.net language, running on the latest version 16. Getting started with the OneCompiler's VB.net compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as VB.net
. OneCompiler also has reference programs, where you can look for the sample code to get started with.
OneCompiler's VB.net online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample VB.net program which takes name as input and prints hello message with your name.
Public Module Program
Public Sub Main(args() As string)
Dim name as String = Console.ReadLine() ' Reading input from STDIN
Console.WriteLine("Hello " & name) ' Writing output to STDOUT
End Sub
End Module
Visual Basic is a event driven programming language by Microsoft, first released in the year 1991.
Variable is a name given to the storage area in order to identify them in our programs.
Simple syntax of Variable declaration is as follows
Dim variableName [ As [ New ] dataType ] [ = initializer ]
variableName = value
If condition-expression Then
'code
End If
If(conditional-expression)Then
'code if the conditional-expression is true
Else
'code if the conditional-expression is false
End If
If(conditional-expression)Then
'code if the above conditional-expression is true
Else If(conditional-expression) Then
'code if the above conditional-expression is true
Else
'code if the above conditional-expression is false
End If
If(conditional-expression)Then
'code if the above conditional-expression is true
If(conditional-expression)Then
'code if the above conditional-expression is true
End If
End If
Select [ Case ] expression
[ Case expressionlist
'code ]
[ Case Else
'code ]
End Select
For counter [ As datatype ] = begin To end [ Step step ]
'code
[ Continue For ]
'code
[ Exit For ]
'code
Next [ counter ]
For Each element [ As datatype ] In group
'code
[ Continue For ]
'code
[ Exit For ]
'code
Next [ element ]
While conditional-expression
'Code
[ Continue While ]
'Code
[ Exit While ]
'Code
End While
Do { While | Until } conditional-expression
'Code
[ Continue Do ]
'Code
[ Exit Do ]
'Code
Loop
Do
'Code
[ Continue Do ]
'Code
[ Exit Do ]
'Code
Loop { While | Until } conditional-expression
Procedure is a sub-routine which contains set of statements. Usually Procedures are written when multiple calls are required to same set of statements which increases re-usuability and modularity.
Procedures are of two types.
Functions return a value when they are called.
[accessModifiers] Function functionName [(parameterList)] As returnType
'code
End Function
Sub-procedures are similar to functions but they don't return any value.
Sub ProcedureName (parameterList)
'Code
End Sub