?? form_setcompany.frm
字號:
VERSION 5.00
Begin VB.Form form_setCompany
BackColor = &H00C0FFFF&
Caption = "設置公司名稱"
ClientHeight = 3450
ClientLeft = 60
ClientTop = 345
ClientWidth = 4590
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 3450
ScaleWidth = 4590
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtName
Height = 375
Left = 360
TabIndex = 0
Top = 960
Width = 3375
End
Begin VB.CommandButton cmdClose
Caption = "&C關閉"
Height = 375
Left = 2760
TabIndex = 2
Top = 2280
Width = 1095
End
Begin VB.CommandButton cmdConfirm
Caption = "&O確定"
Height = 375
Left = 360
TabIndex = 1
Top = 2280
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00C0FFFF&
Caption = "請輸入你公司的名稱:"
Height = 255
Left = 360
TabIndex = 3
Top = 480
Width = 1935
End
End
Attribute VB_Name = "form_setCompany"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdConfirm_Click()
If Me.txtName.Text = "" Then
MsgBox "請輸入你的公司名稱!", vbCritical, "警告"
Me.txtName.SetFocus
Exit Sub
End If
Dim sql As String
' 先刪除,再新增
On Error GoTo errprompt
wrks.BeginTrans
sql = "delete from hp_sysParas where (((hp_sysParas.paraCode)='companyName')) "
g_db.Execute (sql)
sql = " INSERT INTO hp_sysParas ( paraCode, paraValue, paraDesc ) values('companyName','" + Me.txtName.Text + "','公司名稱') "
g_db.Execute (sql)
wrks.CommitTrans
g_companyName = Me.txtName.Text
MsgBox "設置成功!", vbInformation, "提示"
Exit Sub
errprompt:
wrks.Rollback
Me.MousePointer = 0
MsgBox "操作失?。?quot;, vbCritical, "警告"
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
Me.txtName.Text = g_companyName
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -