FORM1 İçerisine Yazılacak Kodlar…
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Dim Form2 As New Form2()
If Integer.Parse(textBox1.Text) = 1907 Then
Form2.Show()
Me.Hide()
Else
MessageBox.Show("Yanlış Şifre ")
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
button1.Enabled = False
End Sub
Private Sub textBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles textBox1.TextChanged
button1.Enabled = True
End Sub
FORM2 İçerisine Yazılacak Kodlar…
Imports System.Data.OleDb
Public Class Form2
Dim bag As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=yesim.mdb")
Dim kmt As New OleDbCommand
Dim adtr As OleDbDataAdapter
Dim dtst As New DataSet
Sub listele()
bag.Open()
adtr = New OleDbDataAdapter("select * From tablo1", bag)
adtr.Fill(dtst, "tablo1")
dataGridView1.DataSource = dtst
dataGridView1.DataMember = "tablo1"
bag.Close()
adtr.Dispose()
End Sub
Private Sub dosyaToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dosyaToolStripMenuItem1.Click
saveFileDialog1.ShowDialog()
End Sub
Private Sub nickDeğiştirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nickDeğiştirToolStripMenuItem.Click
Dim frm3 = New Form3()
frm3.Show()
Me.Hide()
End Sub
Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.Click
groupBox1.Visible = True
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
listele()
groupBox1.Visible = False
groupBox2.Visible = False
End Sub
Private Sub görüntüResmiDeğiştirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles görüntüResmiDeğiştirToolStripMenuItem.Click
saveFileDialog1.ShowDialog()
Dim ara As String
ara = saveFileDialog1.FileName
pictureBox1.Load(ara)
End Sub
Private Sub oturumKapatToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles oturumKapatToolStripMenuItem.Click
Dim frm1 = New Form1()
frm1.Show()
Me.Hide()
End Sub
Private Sub oturumKilitleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles oturumKilitleToolStripMenuItem.Click
Dim frm4 = New Form4()
frm4.Show()
Me.Hide()
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
bag.Open()
kmt.Connection = bag
kmt.CommandText = "INSERT INTO Tablo1( Kişiler,Msn ) VALUES ('" + textBox1.Text + "','" + textBox2.Text + "')"
kmt.ExecuteNonQuery()
bag.Close()
kmt.Dispose()
dtst.Clear()
listele()
groupBox1.Visible = False
End Sub
Private Sub button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button3.Click
groupBox2.Visible = True
End Sub
Private Sub button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button4.Click
bag.Open()
kmt.Connection = bag
kmt.CommandText = "DELETE FROM Tablo1 WHERE Msn='" + textBox3.Text + "'"
kmt.ExecuteNonQuery()
bag.Close()
kmt.Dispose()
dtst.Clear()
listele()
groupBox2.Visible = False
End Sub
Private Sub kişiEkleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kişiEkleToolStripMenuItem.Click
groupBox1.Visible = True
End Sub
Private Sub kişiSilToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kişiSilToolStripMenuItem.Click
groupBox2.Visible = True
End Sub
End Class
FORM3 İçerisine Yazılacak Kodlar…
Public Class Form3
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Dim frm2 = New Form2()
frm2.Show()
Me.Hide()
frm2.label1.Text = textBox1.Text
End Sub
End Class
FORM4 İçerisine Yazılacak Kodlar…
Public Class Form4
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Dim frm2 = New Form2()
frm2.Show()
Me.Hide()
End Sub
End Class