Public Class 系統登出
    Private Sub 系統登出_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    End Sub
    Private Sub 系統登出_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
        If 系統語言 = "繁體中文" Then : 主題_lb.Text = "系統登出" : Label1.Text = "系統閒置時間過長，30秒後即將重登!!"
        ElseIf 系統語言 = "English" Then : 主題_lb.Text = "Logout" : Label1.Text = "System idle time too long, will log in again in 30 seconds!!"
        ElseIf 系統語言 = "Indonesian" Then : 主題_lb.Text = "Keluar dari Sistem" : Label1.Text = "Waktu menganggur sistem terlalu lama, akan masuk kembali dalam 30 detik!!" : End If
    End Sub
    Private Sub 確定_rbt_Click(sender As Object, e As EventArgs) Handles 確定_rbt.Click
        重登確認 = True : Me.Close()
    End Sub
    Private Sub 取消_rbt_Click(sender As Object, e As EventArgs) Handles 取消_rbt.Click
        重登確認 = False : Me.Close()
    End Sub

    Dim nOldWndLeft, nOldWndTop, nClickX, nClickY As Integer
    Private Sub PnlTitleBar_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PnlTitleBar.MouseDown
        '紀錄滑鼠點選時的視窗位置與滑鼠點選位置
        nOldWndLeft = Me.Left : nOldWndTop = Me.Top : nClickX = e.X : nClickY = e.Y
    End Sub

    Private Sub PnlTitleBar_Paint(sender As Object, e As PaintEventArgs) Handles PnlTitleBar.Paint

    End Sub

    Private Sub PnlTitleBar_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PnlTitleBar.MouseMove
        If PnlTitleBar.Capture = True Then        '如果滑鼠按著拖曳
            Me.Top = e.Y + nOldWndTop - nClickY : Me.Left = e.X + nOldWndLeft - nClickX   '設定新的視窗位置
            nOldWndLeft = Me.Left : nOldWndTop = Me.Top   '更新紀錄的視窗位置
        End If
    End Sub
    Private Sub 主題_lb_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 主題_lb.MouseDown
        '紀錄滑鼠點選時的視窗位置與滑鼠點選位置
        nOldWndLeft = Me.Left : nOldWndTop = Me.Top : nClickX = e.X : nClickY = e.Y
    End Sub
    Private Sub 主題_lb_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles 主題_lb.MouseMove
        If 主題_lb.Capture = True Then        '如果滑鼠按著拖曳
            Me.Top = e.Y + nOldWndTop - nClickY : Me.Left = e.X + nOldWndLeft - nClickX   '設定新的視窗位置
            nOldWndLeft = Me.Left : nOldWndTop = Me.Top   '更新紀錄的視窗位置
        End If
    End Sub
End Class