⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 paramtercfg.frm

📁 本系统是一个报表分析查询系统
💻 FRM
字号:
VERSION 5.00
Object = "{A4CC7269-ED5B-4470-AA0B-8F3189B903BF}#4.0#0"; "XhuiButton.ocx"
Begin VB.Form ParamterCfg 
   BackColor       =   &H00FF8080&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   4665
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   4665
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1920
      Style           =   2  'Dropdown List
      TabIndex        =   11
      Top             =   3120
      Width           =   2175
   End
   Begin XhuiButton.CandyButton CandyButton2 
      Height          =   615
      Left            =   2760
      TabIndex        =   9
      Top             =   3840
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   1085
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "CandyButton2"
      Checked         =   0   'False
      ColorButtonHover=   16760976
      ColorButtonUp   =   15309136
      ColorButtonDown =   15309136
      BorderBrightness=   0
      ColorBright     =   16772528
      DisplayHand     =   0   'False
      ColorScheme     =   0
   End
   Begin XhuiButton.CandyButton CandyButton1 
      Height          =   615
      Left            =   240
      TabIndex        =   8
      Top             =   3840
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   1085
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "CandyButton1"
      Checked         =   0   'False
      ColorButtonHover=   16760976
      ColorButtonUp   =   15309136
      ColorButtonDown =   15309136
      BorderBrightness=   0
      ColorBright     =   16772528
      DisplayHand     =   0   'False
      ColorScheme     =   0
   End
   Begin VB.TextBox Text4 
      Appearance      =   0  'Flat
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   7
      Text            =   "Text4"
      Top             =   2160
      Width           =   2295
   End
   Begin VB.TextBox Text3 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   1800
      TabIndex        =   6
      Text            =   "Text3"
      Top             =   1440
      Width           =   2175
   End
   Begin VB.TextBox Text2 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   1800
      TabIndex        =   5
      Text            =   "Text2"
      Top             =   720
      Width           =   2175
   End
   Begin VB.TextBox Text1 
      Appearance      =   0  'Flat
      Height          =   495
      Left            =   1800
      TabIndex        =   4
      Text            =   "Text1"
      Top             =   120
      Width           =   2055
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "登录方式:"
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   360
      TabIndex        =   10
      Top             =   3120
      Width           =   1335
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "登录密码:"
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   360
      TabIndex        =   3
      Top             =   2280
      Width           =   1335
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名称:"
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   360
      TabIndex        =   2
      Top             =   1560
      Width           =   1335
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "数 据 库:"
      ForeColor       =   &H00FFFFFF&
      Height          =   615
      Left            =   360
      TabIndex        =   1
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "服 务 器:"
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   360
      TabIndex        =   0
      Top             =   120
      Width           =   1095
   End
End
Attribute VB_Name = "ParamterCfg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CandyButton1_Click()
 Dim EObj As Object
 Dim LoginStyle As String
 Dim XmlFile As String
 XmlFile = App.Path & "\System.Xml"
 Set EObj = CreateObject("ABCCrypto2.Crypto")
 EObj.License = "131-598-271-072"
 EObj.Password = "FxGang_Soft"
 If Trim(Text1.Text) = "" Then
  MsgBox "数据库服务器名称必须填写" & Chr(13) & "你也可以填写数据服务器的IP地址", vbCritical + vbOKOnly, obj.getMsgInfo
  Exit Sub
 End If
 If Trim(Text2.Text) = "" Then
  MsgBox "数据库必须填写", vbCritical + vbOKOnly, obj.getMsgInfo
  Exit Sub
 End If
 If Trim(Text3.Text) = "" Then
  MsgBox "数据库登录用户名必须填写", vbCritical + vbOKOnly, obj.getMsgInfo
  Exit Sub
 End If
 '//If Trim(Text4.Text) = "" Then
  '//MsgBox "数据库登录密码必须填写", vbCritical + vbOKOnly, obj.getMsgInfo
 '// Exit Sub
 '//End If
 '//
 Select Case Trim(Combo1.Text)
  Case "独立登录"
   LoginStyle = "1"
  Case "金蝶 K/3"
   LoginStyle = "2"
 End Select
 '//
 Call setXmlValue(XmlFile, "Rpt/Server/Name", EObj.Encrypt(Trim(Text1.Text)))
 Call setXmlValue(XmlFile, "Rpt/Server/Data", EObj.Encrypt(Trim(Text2.Text)))
 Call setXmlValue(XmlFile, "Rpt/Server/User", EObj.Encrypt(Trim(Text3.Text)))
 Call setXmlValue(XmlFile, "Rpt/Server/Pass", EObj.Encrypt(Trim(Text4.Text)))
 Call setXmlValue(XmlFile, "Rpt/System/LoginID", LoginStyle)
 '//
 MsgBox "数据库环境参数配置完成", vbInformation + vbOKOnly, obj.getMsgInfo
 Set objBase = Nothing
 Unload Me
End Sub

Private Sub CandyButton2_Click()
 Unload Me
End Sub

Private Sub Form_Load()
 '//排列控件
 Dim xLeft As Long
 Dim xTop As Long
 Dim xInterval As Long
 xLeft = 50
 xTop = 50
 Label1.AutoSize = True
 xInterval = (Me.ScaleHeight - Label1.Height * 5 - 100) / 7
 With Label1
  .Left = xLeft
  .Top = xTop
 End With
 With Text1
  .Left = Label1.Left + Label1.Width
  .Top = Label1.Top
  .Width = Me.ScaleWidth - Label1.Width - 100
  .Height = Label1.Height
 End With
 
 With Label2
  .AutoSize = True
  .Left = Label1.Left
  .Top = Label1.Top + Label1.Height + xInterval
 End With
 With Text2
  .Left = Text1.Left
  .Top = Label2.Top
  .Width = Text1.Width
  .Height = Text1.Height
 End With
 
 With Label3
  .AutoSize = True
  .Left = Label2.Left
  .Top = Label2.Top + Label2.Height + xInterval
 End With
 With Text3
  .Left = Text2.Left
  .Top = Label3.Top
  .Width = Text2.Width
  .Height = Text2.Height
 End With
 
 With Label4
  .AutoSize = True
  .Left = Label3.Left
  .Top = Label3.Top + Label3.Height + xInterval
 End With
 With Text4
  .Left = Text3.Left
  .Top = Label4.Top
  .Width = Text3.Width
  .Height = Text3.Height
 End With
 
 With Label5
  .AutoSize = True
  .Left = Label4.Left
  .Top = Label4.Top + Label4.Height + xInterval
 End With
 
 With Combo1
  .Left = Text4.Left
  .Top = Label5.Top
  .AddItem "独立登录"
  .AddItem "金蝶 K/3"
  .ListIndex = 1
 End With
 
 Text1.Text = ""
 Text2.Text = ""
 Text3.Text = ""
 Text4.Text = ""
 
 '//
 With CandyButton1
  .Top = Label5.Top + Label5.Height + xInterval
  .Left = xLeft * 10
  .Caption = "设置"
 End With
 
 With CandyButton2
  .Top = CandyButton1.Top
  .Width = CandyButton1.Width
  .Height = CandyButton1.Height
  .Left = Me.ScaleWidth - CandyButton1.Width - xLeft * 10
  .Caption = "取消"
 End With
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -