Option Strict Off Imports System.Data.SqlClient Public Class 系統通用變數管理 Dim GGHH As Integer : Dim FFGG As Integer Private Sub 系統通用變數管理_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.MdiParent = GCM_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True ConnOpen() SQL1 = "SELECT timeExit, timeExit2 FROM 系統閒置時間設定" CmdSet_For_dr() If dr.Read() Then : TextBox2.Text = dr("timeExit") : TextBox1.Text = dr("timeExit2") : End If : conn.Close() GGHH = Val(TextBox2.Text) : FFGG = Val(TextBox1.Text) TextBox3.Text = 密碼時限 End Sub Private Sub 登入閒置控制_MouseMove(sender As Object, e As EventArgs) Handles MyBase.MouseMove timeNow = 0 GCM_ERP_SYS.Timer1.Enabled = False GCM_ERP_SYS.Timer1.Enabled = True End Sub Private Sub 登入閒置控制_KeyPress(sender As Object, e As EventArgs) Handles MyBase.KeyPress timeNow = 0 GCM_ERP_SYS.Timer1.Enabled = False GCM_ERP_SYS.Timer1.Enabled = True End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click ConnOpen() SQL1 = "UPDATE 系統閒置時間設定 SET timeExit = N'" & TextBox2.Text & "', timeExit2 = N'" & TextBox1.Text & "' WHERE (timeExit = N'" & GGHH & "' AND timeExit2 = N'" & FFGG & "')" CmdSet_For_dr() conn.Close() GGHH = Val(TextBox2.Text) : FFGG = Val(TextBox1.Text) : timeExit = GGHH : timeExit2 = FFGG MsgBox("修改完畢") End Sub End Class