?? frmsysset.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmsysset
BackColor = &H00404040&
BorderStyle = 3 'Fixed Dialog
Caption = "醫院信息管理系統遠程服務設置"
ClientHeight = 2160
ClientLeft = 45
ClientTop = 330
ClientWidth = 4140
Icon = "frmsysset.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
Picture = "frmsysset.frx":030A
ScaleHeight = 2160
ScaleWidth = 4140
ShowInTaskbar = 0 'False
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 360
Top = 0
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.ComboBox Combo1
BackColor = &H00FFFFFF&
ForeColor = &H000000FF&
Height = 300
ItemData = "frmsysset.frx":26ED
Left = 1800
List = "frmsysset.frx":26F4
TabIndex = 5
Top = 1050
Width = 2000
End
Begin VB.CommandButton Command3
Caption = "關閉&(C)"
Height = 300
Left = 2800
TabIndex = 8
Top = 1680
Width = 1000
End
Begin VB.CommandButton Command2
Caption = "修改&(E)"
Height = 300
Left = 1610
TabIndex = 7
Top = 1680
Width = 1000
End
Begin VB.CommandButton Command1
Caption = "保存&(S)"
Height = 300
Left = 400
TabIndex = 6
Top = 1680
Width = 1000
End
Begin VB.TextBox Text2
BackColor = &H00FFFFFF&
ForeColor = &H000000FF&
Height = 270
Left = 1800
TabIndex = 4
Top = 690
Width = 2000
End
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
ForeColor = &H000000FF&
Height = 270
Left = 1800
TabIndex = 3
Top = 330
Width = 2000
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H00404040&
BackStyle = 0 'Transparent
Caption = "遠程數據庫位置:"
ForeColor = &H00000000&
Height = 180
Left = 360
TabIndex = 2
Top = 1080
Width = 1350
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00404040&
BackStyle = 0 'Transparent
Caption = "遠程服務器名稱:"
ForeColor = &H00000000&
Height = 180
Left = 360
TabIndex = 1
Top = 720
Width = 1350
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00404040&
BackStyle = 0 'Transparent
Caption = "使用者單位名稱:"
ForeColor = &H00000000&
Height = 180
Left = 360
TabIndex = 0
Top = 360
Width = 1350
End
End
Attribute VB_Name = "frmsysset"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo err1
If Text1.text = "" Or Text2.text = "" Or Combo1.text = "" Then
MsgBox "本參數的設置不能為空!"
Else
Adodc1.Recordset.Fields("單位名稱") = Text1.text
Adodc1.Recordset.Fields("服務器名稱") = Text2.text
Adodc1.Recordset.Fields("數據庫位置") = Combo1.text
Adodc1.Recordset.UpdateBatch
MsgBox "遠程服務器設置成功,此參數非管理人員不能修改!"
Text1.Locked = True
Text2.Locked = True
Combo1.Locked = True
End If
Command1.Enabled = False
Exit Sub
err1:
MsgBox "數據庫連接失敗!"
End Sub
Private Sub Command2_Click()
Text1.Locked = False
Text2.Locked = False
Combo1.Locked = False
Command1.Enabled = True
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活動窗口:" & frmsysset.Caption
End Sub
Private Sub Form_Load()
On Error GoTo err2
frmsysset.Top = (frmmain.Height - frmsysset.Height) / 2 - 500
frmsysset.Left = (frmmain.Width - frmsysset.Width) / 2
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\systemset.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select *from setinfo order by ID"
Adodc1.Refresh
Text1.text = Adodc1.Recordset.Fields("單位名稱")
Text2.text = Adodc1.Recordset.Fields("服務器名稱")
Combo1.text = Adodc1.Recordset.Fields("數據庫位置")
Command1.Enabled = False
Text1.Locked = True
Text2.Locked = True
Combo1.Locked = True
If frmlogin.userright = "0" Then
Command2.Enabled = True
Else
Command2.Enabled = False
End If
Exit Sub
err2:
MsgBox "數據庫連接失敗!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前沒有窗口被激活"
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -