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

📄 config.frm

📁 This application i made for handle simple finance this project using VB 6.0, SQL Server 2000 wit
💻 FRM
字号:
VERSION 5.00
Object = "{D18BBD1F-82BB-4385-BED3-E9D31A3E361E}#1.0#0"; "KewlButtonz.ocx"
Begin VB.Form frmConfig 
   BackColor       =   &H00FBF7F4&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Configuration"
   ClientHeight    =   3600
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3900
   BeginProperty Font 
      Name            =   "Verdana"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Config.frx":0000
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   240
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   260
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin KewlButtonz.KewlButtons btnCancel 
      Height          =   390
      Left            =   2400
      TabIndex        =   9
      Top             =   2850
      Width           =   1290
      _ExtentX        =   2275
      _ExtentY        =   688
      BTYPE           =   3
      TX              =   "&Cancel"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      FOCUSR          =   -1  'True
      BCOL            =   15002603
      BCOLO           =   15002603
      FCOL            =   0
      FCOLO           =   0
      MCOL            =   12632256
      MPTR            =   0
      MICON           =   "Config.frx":0EBA
      UMCOL           =   -1  'True
      SOFT            =   0   'False
      PICPOS          =   0
      NGREY           =   0   'False
      FX              =   0
      HAND            =   0   'False
      CHECK           =   0   'False
      VALUE           =   0   'False
   End
   Begin KewlButtonz.KewlButtons btnSave 
      Height          =   390
      Left            =   1050
      TabIndex        =   8
      Top             =   2850
      Width           =   1290
      _ExtentX        =   2275
      _ExtentY        =   688
      BTYPE           =   3
      TX              =   "&Save"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      FOCUSR          =   -1  'True
      BCOL            =   15002603
      BCOLO           =   15002603
      FCOL            =   0
      FCOLO           =   0
      MCOL            =   12632256
      MPTR            =   0
      MICON           =   "Config.frx":0ED6
      UMCOL           =   -1  'True
      SOFT            =   0   'False
      PICPOS          =   0
      NGREY           =   0   'False
      FX              =   0
      HAND            =   0   'False
      CHECK           =   0   'False
      VALUE           =   0   'False
   End
   Begin VB.TextBox txtConfig 
      Appearance      =   0  'Flat
      Height          =   315
      IMEMode         =   3  'DISABLE
      Index           =   3
      Left            =   1425
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   2175
      Width           =   2265
   End
   Begin VB.TextBox txtConfig 
      Appearance      =   0  'Flat
      Height          =   315
      Index           =   2
      Left            =   1425
      TabIndex        =   5
      Top             =   1800
      Width           =   2265
   End
   Begin VB.TextBox txtConfig 
      Appearance      =   0  'Flat
      Height          =   315
      Index           =   0
      Left            =   1425
      TabIndex        =   1
      Top             =   1050
      Width           =   2265
   End
   Begin VB.TextBox txtConfig 
      Appearance      =   0  'Flat
      Height          =   315
      Index           =   1
      Left            =   1425
      TabIndex        =   3
      Top             =   1425
      Width           =   2265
   End
   Begin Irfan.IrfanHeader ihdForm 
      Align           =   1  'Align Top
      Height          =   825
      Left            =   0
      Top             =   0
      Width           =   3900
      _ExtentX        =   6879
      _ExtentY        =   1455
      Text            =   "Configuration"
   End
   Begin VB.Label lblForm 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Password:"
      Height          =   195
      Index           =   3
      Left            =   225
      TabIndex        =   6
      Top             =   2220
      Width           =   885
   End
   Begin VB.Label lblForm 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Ser&ver:"
      Height          =   195
      Index           =   0
      Left            =   225
      TabIndex        =   0
      Top             =   1095
      Width           =   660
   End
   Begin VB.Label lblForm 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Database:"
      Height          =   195
      Index           =   1
      Left            =   225
      TabIndex        =   2
      Top             =   1470
      Width           =   885
   End
   Begin VB.Label lblForm 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&User Name:"
      Height          =   195
      Index           =   2
      Left            =   225
      TabIndex        =   4
      Top             =   1845
      Width           =   1020
   End
End
Attribute VB_Name = "frmConfig"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Option Explicit


Private Sub btnCancel_Click()

  Call Unload(Me)

End Sub

Private Sub btnSave_Click()

  btnSave.Enabled = False

  If (Not (ValidSave())) Then
    btnSave.Enabled = True
    Exit Sub
  End If

  Call SaveConfig(Trim(txtConfig(0).Text), Trim(txtConfig(1).Text), Trim(txtConfig(2).Text), Trim(txtConfig(3).Text))
  btnSave.Enabled = True

  Call Unload(Me)

End Sub

Private Sub Form_Load()

  Call LoadConfig(True)

End Sub

Private Sub txtConfig_GotFocus(Index As Integer)

  Call TextFocus(txtConfig(Index), True, False)

End Sub

Private Function ValidSave() As Boolean

  exString = ""

  If (EmptyString(txtConfig(0).Text)) Then
    Call ErrorStringAdd("- Server harus diisi.")
  End If

  If (EmptyString(txtConfig(1).Text)) Then
    Call ErrorStringAdd("- Database harus diisi.")
  End If

  If (EmptyString(txtConfig(2).Text)) Then
    Call ErrorStringAdd("- User Name harus diisi.")
  End If

  ValidSave = (ValidationString(exString))

End Function

Private Sub SaveConfig(ByVal nServer As String, ByVal nDb As String, ByVal nUser As String, ByVal nPwd As String)

  Call SaveSetting(App.Title, IndexString(LoadResString(5), 0), IndexString(LoadResString(5), 1), nServer)
  Call SaveSetting(App.Title, IndexString(LoadResString(5), 0), IndexString(LoadResString(5), 2), nDb)
  Call SaveSetting(App.Title, IndexString(LoadResString(5), 0), IndexString(LoadResString(5), 3), nUser)
  Call SaveSetting(App.Title, IndexString(LoadResString(5), 0), IndexString(LoadResString(5), 4), nPwd)

  conn.ConnectionString = Replace(LoadResString(6), "@n0", nServer)
  conn.ConnectionString = Replace(conn.ConnectionString, "@n1", nDb)
  conn.ConnectionString = Replace(conn.ConnectionString, "@n2", nUser)
  conn.ConnectionString = Replace(conn.ConnectionString, "@n3", nPwd)

End Sub


⌨️ 快捷键说明

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