📄 frmmain.frm
字号:
VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "设置登录模式"
ClientHeight = 2880
ClientLeft = 45
ClientTop = 450
ClientWidth = 4995
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2880
ScaleWidth = 4995
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 3000
TabIndex = 4
Top = 2280
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "设置"
Height = 495
Left = 480
TabIndex = 3
Top = 2280
Width = 1215
End
Begin VB.Frame Frame1
Caption = "选择登陆模式"
Height = 1935
Left = 120
TabIndex = 0
Top = 120
Width = 4695
Begin VB.OptionButton Option2
Caption = "金蝶K/3系统模式"
Height = 495
Left = 720
TabIndex = 2
Top = 1080
Value = -1 'True
Width = 3015
End
Begin VB.OptionButton Option1
Caption = "独立系统模式"
Height = 375
Left = 720
TabIndex = 1
Top = 360
Width = 3375
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Reslt As String
Private Sub Command1_Click()
On Error GoTo ErrHandle
If Option1.Value = True Then
Reslt = "1"
End If
If Option2.Value = True Then
Reslt = "2"
End If
'//
Call setXmlValue(App.Path & "\System.Xml", "Rpt/System/LoginID", Reslt)
MsgBox "修改登录方式成功", vbInformation + vbOKOnly, "金软提示"
Exit Sub
ErrHandle:
MsgBox "错误:" & Err.Description, vbCritical + vbOKOnly, "金软提示"
End Sub
Private Sub Command2_Click()
End
End Sub
'//修改XML文件
Public Function setXmlValue(ByVal XmlFile As String, ByVal AppKey As String, ByVal AppValue As String) As Boolean
On Error GoTo ErrHandle
Dim objXml As New DOMDocument
Dim objNode As IXMLDOMNode
'//
Call objXml.Load(XmlFile)
'//
Set objNode = objXml.selectSingleNode(AppKey)
If objNode Is Nothing Then
Set objNode = Nothing
Set objXml = Nothing
setXmlValue = False
Exit Function
Else
objNode.nodeTypedValue = AppValue
Call objXml.save(XmlFile)
End If
'//
Set objNode = Nothing
Set objXml = Nothing
setXmlValue = True
Exit Function
ErrHandle:
setXmlValue = False
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -