Public Class Form2
Private Const WM_DEVICECHANGE As Integer = &H219
Private Const DBT_DEVICEARRIVAL As Integer = &H8000
Protected Overrides Sub WndProc(ByRef m As Message)
If m.Msg = WM_DEVICECHANGE Then
If m.WParam.ToInt32() = DBT_DEVICEARRIVAL Then
Dim frmForm7 As New Form7
frmForm7.Show()
End If
End If
MyBase.WndProc(m)
End Sub
Private Sub FileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FileToolStripMenuItem.Click
End Sub
Private Sub LoadLibraryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadLibraryToolStripMenuItem.Click
Dim frmForm4 As New Form4
frmForm4.Show()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
If MessageBox.Show("Exit Library Program?", "", MessageBoxButtons.YesNo) = DialogResult.Yes Then
Application.Exit()
End If
End Sub
Private Sub SaveLibraryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveLibraryToolStripMenuItem.Click
Dim frmForm3 As New Form3
frmForm3.Show()
End Sub
Private Sub RegisterNewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RegisterNewToolStripMenuItem.Click
Dim frmForm5 As New Form5
frmForm5.Show()
End Sub
Private Sub EditAcountToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditAcountToolStripMenuItem.Click
Dim frmForm6 As New Form6
frmForm6.Show()
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'MydatabaseDataSet1.libraryfile' table. You can move, or remove it, as needed.
Me.LibraryfileTableAdapter.Fill(Me.MydatabaseDataSet1.libraryfile)
txtUser.Text = Class1.str
End Sub
End Class