Public Class Form1 Dim a, b, c As Double Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If (TextBox1.
Text = " " Or IsNumeric([Link]) = False) Then MsgBox("Pls Enter Value or Only Numeric Value") [Link]() Exit Sub End If If ([Link] = " " Or IsNumeric([Link]) = False) Then MsgBox("Pls Enter Value or Only Numeric Value") [Link]() Exit Sub End If a = [Link] b = [Link] c = a + b [Link] = c End Sub Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] a = [Link] b = [Link] c = a - b [Link] = c End Sub Private Sub Button3_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] a = [Link] b = [Link] c = a / b [Link] = c End Sub Private Sub Button4_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] a = [Link] b = [Link] c = a * b [Link] = c End Sub Private Sub Form1_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class
================================================================= ===============
Public Class Form2 Dim n1, n2 As Double Dim op As String Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link], [Link], [Link], [Link], [Link], [Link], [Link], [Link], [Link], [Link] [Link] += [Link] End Sub Private Sub Button11_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] n1 = Val([Link]) op = "+" [Link] = "" End Sub Private Sub Button12_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] n1 = Val([Link]) op = "-" [Link] = "" End Sub Private Sub Button13_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] n1 = Val([Link]) op = "*" [Link] = "" End Sub Private Sub Button14_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] n1 = Val([Link]) op = "/" [Link] = "" End Sub Private Sub Button15_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] n2 = Val([Link]) If (op = "+") Then [Link] = n1 + n2 End If If (op = "-") Then
[Link] = n1 - n2 End If If (op = "*") Then [Link] = n1 * n2 End If If (op = "/") Then [Link] = n1 / n2 End If End Sub Private Sub Button16_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] += "." End Sub Private Sub Button17_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link]([Link]) End Sub Private Sub Button18_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = (-1) * [Link] End Sub Private Sub Form2_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= =============== Public Class Form3 Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim i As Integer i = MsgBox("You Want Exit?", [Link] + [Link] + MsgBoxStyle.DefaultButton2, "Exit") If (i = [Link]) Then [Link]() End If End Sub Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] MsgBox("Record Successfuly Save.") End Sub
Private Sub Form3_KeyDown(ByVal sender As Object, ByVal e As [Link]) Handles [Link] MsgBox([Link]) 'If ([Link] = 27) Then '27 for exit ' Button1_Click(sender, e) 'End If 'If ([Link] = 113) Then '113 for f2 key ' Button2_Click(sender, e) 'End If 'If ([Link] = 114) Then ' [Link]() 'End If End Sub
Private Sub Form3_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub Form3_MouseEnter(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub Private Sub Form3_MouseLeave(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub End Class ================================================================= ============== Public Class Form4 Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As [Link]) Handles [Link] Dim i As Integer i = Asc([Link]) If (i = 8) Then Exit Sub End If If i = 13 Then [Link]("{Tab}") Exit Sub End If If (i < 47 Or i > 58) Then MsgBox("only 0 to 9 enter") [Link] = True
End If End Sub Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As [Link]) Handles [Link] Dim i As Integer i = Asc([Link]) End Sub Private Sub Form4_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= ============= Public Class Form6 Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If [Link] = True Then MsgBox("You Select " & [Link]) End If End Sub Private Sub CheckBox2_CheckedChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If [Link] = True Then MsgBox("You Select " & [Link]) End If End Sub Private Sub Form6_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class
================================================================= =============== Public Class Form7 Private Sub RadioButton1_CheckedChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If [Link] = True Then [Link] = [Link] * 5 / 100 End If End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If [Link] = True Then [Link] = [Link] * 10 / 100 End If End Sub Private Sub RadioButton3_CheckedChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If [Link] = True Then [Link] = [Link] * 15 / 100 End If End Sub Private Sub RadioButton4_CheckedChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If [Link] = True Then [Link] = [Link] * 20 / 100 End If End Sub Private Sub Form7_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= ============== Public Class Form8 Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As [Link]) Handles [Link]
Dim i As Integer i = Asc([Link]) If (i = 8 Or i = 32) Then Exit Sub End If If (i = 13) Then [Link]("{Tab}") Exit Sub End If If (i >= 65 And i <= 90) Or (i >= 97 And i <= 122) Then [Link] = False Else [Link] = True End If End Sub Private Sub TextBox1_(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub Form8_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = "Validiation Form" End Sub End Class ================================================================= =============== Public Class Form9 Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As [Link]) Handles [Link], [Link], [Link] [Link] = [Link] [Link] = [Link] End Sub Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As [Link]) Handles [Link], [Link], [Link] [Link] = [Link] [Link] = [Link] End Sub Private Sub Form9_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class
================================================================= =============== Public Class Form11 Private Sub Form11_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]("Dinesh") [Link]("Subhash") [Link]("Tarun") [Link]("Vikas") [Link]("Vishal") End Sub Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]([Link]) End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] '[Link] = [Link] [Link] = [Link]([Link]) End Sub Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub Private Sub Button3_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub Private Sub Button4_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim i As Integer i = MsgBox("You want Delete?", [Link] + [Link], "Delete") If (i = [Link]) Then [Link]([Link]) End If End Sub Private Sub Button5_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]() End Sub End Class
================================================================= =============== Public Class Form12 Private Sub Form12_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]("Dinesh") [Link]("Vijay") [Link]("Tarun") [Link]("Rakesh") [Link]("Subhash") [Link]("Vikram") [Link]("Ajay") [Link]("Deepak") [Link]("Amer") [Link]("Alok") [Link]("Chandresh") [Link]("Dharmesh") [Link]("Pradeep") End Sub Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If ([Link] = -1) Then MsgBox("Please Select Item", [Link], "Error") Exit Sub End If [Link]([Link]([Link]) ) [Link]([Link]) End Sub Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim i As Integer For i = 0 To [Link] - 1 [Link]([Link](i)) Next [Link]() End Sub Private Sub Button3_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]([Link]([Link]) ) [Link]([Link]) End Sub Private Sub Button4_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link]
Dim i As Integer For i = 0 To [Link] - 1 [Link]([Link](i)) Next [Link]() End Sub End Class ================================================================= =============== Public Class Form13 Private Sub Form13_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]("Ram") [Link]("Shyam") [Link]("Mohan") [Link]("Ganesh") [Link]("Shiva") [Link]("Mahesh") [Link]("Krishna") [Link]("Govind") [Link]("Bharat") [Link]("Rohan") [Link]("Pratap") End Sub Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim i As Integer Dim flag As Integer flag = 0 For i = 0 To [Link] - 1 If ([Link](i).ToString = [Link]) Then flag = 1 Exit For End If Next If (flag = 0) Then [Link]([Link]) Else MsgBox("Dulicate Entry Try again.........") End If End Sub End Class ================================================================= =============== Public Class Form14
Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim ename As String If ([Link] = True) Then ename = "Mr. " + [Link] ElseIf ([Link] = True And [Link] = True) Then ename = "Mrs. " + [Link] Else ename = "Miss. " + [Link] End If [Link](ename) End Sub Private Sub Form14_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= =============== Public Class Form15 Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim i As Integer For i = 0 To [Link] - 1 If [Link](i) = True Then [Link]([Link](i )) End If Next End Sub Private Sub Button3_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim i As Integer For i = 0 To [Link] - 1 [Link](i, True) Next End Sub Private Sub Button4_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim i As Integer For i = 0 To [Link] - 1 [Link](i, False) Next End Sub Private Sub Button5_Click(ByVal sender As [Link],
ByVal e As [Link]) Handles [Link] Dim i As Integer For i = 0 To [Link] - 1 If [Link](i) = True Then [Link](i, False) Else [Link](i, True) End If Next End Sub Private Sub Form15_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= =============== Public Class Form16 Private Sub LinkLabel1_LinkClicked(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]("[Link] [Link]") End Sub Private Sub DateTimePicker1_ValueChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = Format([Link], "ddMMM-yyyy") End Sub Private Sub MonthCalendar1_DateChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] [Link] = [Link] End Sub Private Sub Form16_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class
================================================================= ============== Public Class Form17 'Private Sub ExitToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() 'End Sub 'Private Sub NewToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link] = "" ' [Link]() 'End Sub 'Private Sub CutToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() 'End Sub 'Private Sub CopyToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() 'End Sub 'Private Sub PasteToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() 'End Sub 'Private Sub UndoToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() 'End Sub 'Private Sub RedoToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() 'End Sub Private Sub SaveToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]() [Link]([Link])
End Sub 'Private Sub OpenToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() ' [Link]([Link]) 'End Sub Private Sub FontToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]() [Link] = [Link] End Sub 'Private Sub BackColorToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() ' [Link] = [Link] 'End Sub 'Private Sub ForeColorToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] ' [Link]() ' [Link] = [Link] 'End Sub Private Sub BulltesToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = Not [Link] End Sub Private Sub AligmenetToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub Private Sub CenterToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub
Private Sub RightToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = [Link] End Sub Private Sub PrintDocument1_PrintPage(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]([Link], Font, [Link], 300, 150) End Sub Private Sub PrintPreviewToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = PrintDocument1 [Link]() End Sub Private Sub PrintToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = PrintDocument1 [Link]() End Sub Private Sub PrintSetupToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = PrintDocument1 [Link]() End Sub Private Sub HelpToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link]() End Sub Private Sub BoldToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = New Font([Link], [Link]) End Sub Private Sub ItalicToolStripMenuItem_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link]
[Link] = New Font([Link], [Link]) End Sub Private Sub Form17_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub ToolStripButton1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] SaveToolStripMenuItem_Click(sender, e) End Sub Private Sub ToolStripComboBox1_Click_1(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub ToolStripComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = New Font([Link], [Link]) End Sub Private Sub RichTextBox1_TextChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= ============= Public Class Form18 Private Sub TextBox1_TextChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= ============== Public Class Form19
Dim flag As Integer Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = Not [Link] If flag = 0 Then [Link] = [Link] flag = 1 ElseIf flag = 1 Then [Link] = [Link] flag = 2 ElseIf flag = 2 Then [Link] = [Link] flag = 0 End If End Sub Private Sub Timer2_Tick(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = Format(Now, "hh:mm:ss") End Sub Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = False End Sub Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] [Link] = True End Sub Private Sub Form19_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= ============== Public Class Form20 Dim i As Integer Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If (i > [Link]) Then i = 0 End If [Link] = [Link](i) i = i + 1 End Sub
Private Sub PictureBox1_MouseEnter(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = False End Sub Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As [Link]) Handles [Link] [Link] = True End Sub Private Sub Form20_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class =\=============================================================== =============== Public Class Form21 Dim i As Integer Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] If i > 100 Then [Link] = False [Link]() [Link]() Exit Sub End If [Link] = i i = i + 1 End Sub Private Sub Form21_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class ================================================================= ============= Public Class Form22 Private Sub TextBox2_TextChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class
Public Class Form23 Private Sub Form23_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub TabPage1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub End Class
Imports [Link] Public Class Form24 Dim OleDbCon As New OleDbConnection Private Sub Form24_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim conStr As String conStr = "Provider=[Link].4.0;Data Source=D:\student project\VyasProject\[Link]" [Link] = conStr [Link]() End Sub Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim sqlStr As String Dim OleDbCmd As OleDbCommand Dim tEmpNo, tDeptNo As Integer Dim tSal As Double Dim tEName, tDoj As String tEmpNo = [Link] tEName = [Link] tDoj = Format([Link], "MM/dd/yyyy") tDeptNo = [Link] tSal = [Link] sqlStr = "INSERT INTO emp VALUES(" & tEmpNo & ",'" & tEName & "','" & tDoj & "'," & tDeptNo & "," & tSal & ")" OleDbCmd = New OleDbCommand(sqlStr, OleDbCon) [Link]() MsgBox("Record Successfuly Save") [Link]() End Sub Private Sub Button2_Click(ByVal sender As [Link],
ByVal e As [Link]) Handles [Link] Dim tEmpNo, tDeptNo As Integer Dim tSal As Double Dim tEName, tDoj As String tEmpNo = [Link] tEName = [Link] tDoj = Format([Link], "MM/dd/yyyy") tDeptNo = [Link] tSal = [Link] Dim sqlStr As String Dim OleDbCmd As OleDbCommand sqlStr = "UPDATE emp SET ename='" & tEName & "', doj='" & tDoj & "', deptno=" & tDeptNo & ",sal=" & tSal & " WHERE empno=" & tEmpNo OleDbCmd = New OleDbCommand(sqlStr, OleDbCon) [Link]() MsgBox("Record Successfuly Updae") [Link]() End Sub Private Sub Button3_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim tEmpNo As Integer tEmpNo = [Link] Dim sqlStr As String Dim OleDbCmd As OleDbCommand sqlStr = "DELeTE FROM emp WHERE empno=" & tEmpNo OleDbCmd = New OleDbCommand(sqlStr, OleDbCon) [Link]() MsgBox("Record Successfuly Deleted") [Link]() End Sub Private Sub Button4_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim tEmpNo As Integer Dim sqlStr As String Dim OleDbCmd As OleDbCommand Dim OleDbRead As OleDbDataReader tEmpNo = [Link] sqlStr = "SELECT * FROM emp WHERE empno=" & tEmpNo OleDbCmd = New OleDbCommand(sqlStr, OleDbCon) OleDbRead = [Link] If ([Link]) Then [Link]() [Link] = [Link]("ename") [Link] = [Link]("doj") [Link] = [Link]("deptno")
[Link] = [Link]("sal") Else MsgBox("Record not found") End If [Link]() [Link]() End Sub End Class
Imports [Link] Public Class Form25 Dim OleDbcon As New OleDbConnection Private Sub Form25_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim constr As String constr = "Provider=[Link].4.0;Data Source = D:\student project\VyasProject\[Link]" [Link] = constr [Link]() MsgBox("connection done")
End Sub Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim oleDbcmd As OleDbCommand Dim sql As String Dim OleDbread As OleDbDataReader Dim rollno As Integer rollno = Val([Link]) sql = " select * from stud where rollno = " & rollno & "" oleDbcmd = New OleDbCommand(sql, OleDbcon) OleDbread = [Link] If [Link] Then [Link]() [Link] = [Link]("rollno") [Link] = [Link]("sname") [Link] [Link] [Link] [Link] [Link] [Link] = = = = = = [Link]("S1") [Link]("S2") [Link]("S2") [Link]("tot") [Link]("per") [Link]("div")
[Link] = [Link]("res") MsgBox("record succcessfully found")
End If End Sub Private Sub Label2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub Button8_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] deepak_()
End Sub Private Sub deepak_() [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" [Link] = "" End Sub Private Sub TextBox2_TextChanged(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub BTS_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim oleDbcmd As OleDbCommand Dim sql As String Dim rollno, s1, s2, s3, tot As Integer Dim sname, div, res As String Dim per As Double rollno = [Link] sname = [Link]
s1 = [Link] s2 = [Link] s3 = [Link] tot = [Link] per = [Link] div = [Link] res = [Link] sql = "Insert into stud values(" & rollno & ",'" & sname & "'," & s1 & "," & s2 & "," & s3 & "," & tot & "," & per & ",'" & div & "','" & res & "' )" oleDbcmd = New OleDbCommand(sql, OleDbcon) [Link]() [Link]() Call deepak_() End Sub
Private Sub Button1_Click_1(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] End Sub Private Sub Button1_Enter(ByVal sender As Object, ByVal e As [Link]) Handles [Link] End Sub Private Sub BTD_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim oleDbcmd As OleDbCommand Dim sql As String Dim rollno As Integer rollno = [Link] If [Link] = ("") Then MsgBox("pls enter rollno") End If sql = "delete * from Stud where rollno = " & rollno & "" oleDbcmd = New OleDbCommand(sql, OleDbcon) [Link]() MsgBox("record delete ") [Link]() Call deepak_() End Sub End Class
Imports [Link] Public Class Form26 Dim sqlCon As New SqlConnection Private Sub Form26_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim conStr As String conStr = "Data Source=.;Initial Catalog=Vyas;Integrated Security=True" [Link] = conStr [Link]() MsgBox("Connection Open...!!!!") End Sub Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim sqlStr As String Dim sqlCmd As SqlCommand Dim tEmpNo, tDeptNo As Integer Dim tSal As Double Dim tEName, tDoj As String tEmpNo = [Link] tEName = [Link] tDoj = Format([Link], "MM/dd/yyyy") tDeptNo = [Link] tSal = [Link] sqlStr = "INSERT INTO emp VALUES(" & tEmpNo & ",'" & tEName & "','" & tDoj & "'," & tDeptNo & "," & tSal & ")" sqlCmd = New SqlCommand(sqlStr, sqlCon) [Link]() MsgBox("Record Successfuly Save") [Link]() End Sub Private Sub Button4_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim tEmpNo As Integer Dim sqlStr As String Dim sqlCmd As SqlCommand Dim sqlRead As SqlDataReader tEmpNo = [Link] sqlStr = "SELECT * FROM emp WHERE empno=" & tEmpNo sqlCmd = New SqlCommand(sqlStr, sqlCon) sqlRead = [Link] If ([Link]) Then [Link]() [Link] = [Link]("ename") [Link] = [Link]("doj") [Link] = [Link]("deptno")
[Link] = [Link]("sal") Else MsgBox("Record not found") End If [Link]() [Link]() End Sub End Class