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

📄 frmoption.frm

📁 一个完整的考勤管理系统。开发工具vb6.0
💻 FRM
📖 第 1 页 / 共 2 页
字号:
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Index           =   3
            Left            =   315
            TabIndex        =   21
            Top             =   2070
            Width           =   945
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "联系电话:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Index           =   2
            Left            =   315
            TabIndex        =   20
            Top             =   1545
            Width           =   945
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "公司地址:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Index           =   1
            Left            =   315
            TabIndex        =   19
            Top             =   1020
            Width           =   945
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "公司名称:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Index           =   0
            Left            =   315
            TabIndex        =   18
            Top             =   465
            Width           =   945
         End
      End
   End
   Begin VB.CommandButton cmdApply 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   465
      Left            =   3442
      Picture         =   "frmOption.frx":000C
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   4230
      Width           =   1215
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   465
      Left            =   4770
      Picture         =   "frmOption.frx":1BBD
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   4230
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   465
      Left            =   2115
      Picture         =   "frmOption.frx":38FC
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   4230
      Width           =   1215
   End
   Begin ComctlLib.TabStrip tbsOptions 
      Height          =   3930
      Left            =   120
      TabIndex        =   9
      Top             =   120
      Width           =   5895
      _ExtentX        =   10398
      _ExtentY        =   6932
      _Version        =   327682
      BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7} 
         NumTabs         =   1
         BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7} 
            Caption         =   "公司设置"
            Key             =   "mMyCompany"
            Object.Tag             =   ""
            Object.ToolTipText     =   "为本公司设置选项"
            ImageVarType    =   2
         EndProperty
      EndProperty
      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
   End
End
Attribute VB_Name = "frmOption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdApply_Click()
    gOwnName = Trim(txtOwn(0))
    gOwnAddress = Trim(txtOwn(1))
    gOwnPhone = Trim(txtOwn(2))
    gOwnFax = Trim(txtOwn(3))
    gOwnPost = Trim(txtOwn(4))
    gOwnOwner = Trim(txtOwn(5))
    SaveRegister
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    cmdApply_Click
    Unload Me
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Dim i As Integer
    '处理 ctrl+tab 键,移动到下一个选项卡
    If Shift = vbCtrlMask And KeyCode = vbKeyTab Then
        i = tbsOptions.SelectedItem.Index
        If i = tbsOptions.Tabs.Count Then
            '最后一个选项卡,返回到选项卡 1
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
        Else
            ' 选项卡序数加 1
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
        End If
    End If
    
    Dim AltDown As Boolean
    AltDown = (Shift And vbAltMask) > 0
    If AltDown Then
        Select Case KeyCode
            Case vbKeyA
                cmdApply_Click
            Case vbKeyK
                cmdOK_Click
            Case vbKeyC
                cmdCancel_Click
        End Select
    End If
    
    If KeyCode = 27 Then
        cmdCancel_Click
    End If
End Sub

Private Sub Form_Load()
    '窗体居中
    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
    txtOwn(0) = gOwnName
    txtOwn(1) = gOwnAddress
    txtOwn(2) = gOwnPhone
    txtOwn(3) = gOwnFax
    txtOwn(4) = gOwnPost
    txtOwn(5) = gOwnOwner
End Sub

Private Sub tbsOptions_Click()
    Dim i As Integer
    '显示并激活选中的选项卡控件
    '隐藏并禁止所有其它控件
    For i = 0 To tbsOptions.Tabs.Count - 1
        If i = tbsOptions.SelectedItem.Index - 1 Then
            picOptions(i).Left = 210
            picOptions(i).Enabled = True
        Else
            picOptions(i).Left = -20000
            picOptions(i).Enabled = False
        End If
    Next
    
End Sub

Private Sub txtOwn_GotFocus(Index As Integer)
    GotFocus txtOwn(Index)
End Sub

Private Sub txtOwn_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then
        SendKeyTab KeyCode
    End If
End Sub

⌨️ 快捷键说明

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