frmOption.frm
资源名称:考勤6.rar [点击查看]
上传用户:djzm888
上传日期:2013-02-15
资源大小:867k
文件大小:17k
源码类别:
其他数据库
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
- Begin VB.Form frmOption
- BorderStyle = 3 'Fixed Dialog
- Caption = "选项"
- ClientHeight = 4890
- ClientLeft = 2565
- ClientTop = 1500
- ClientWidth = 6150
- Icon = "frmOption.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4890
- ScaleWidth = 6150
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 3
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 14
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample4
- Caption = "示例 4"
- Height = 1785
- Left = 2100
- TabIndex = 17
- Top = 840
- Width = 2055
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 2
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 13
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample3
- Caption = "示例 3"
- Height = 1785
- Left = 1545
- TabIndex = 16
- Top = 675
- Width = 2055
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 1
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 12
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample2
- Caption = "示例 2"
- Height = 1785
- Left = 645
- TabIndex = 15
- Top = 300
- Width = 2055
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3465
- Index = 0
- Left = 195
- ScaleHeight = 3465
- ScaleWidth = 5685
- TabIndex = 10
- TabStop = 0 'False
- Top = 495
- Width = 5685
- Begin VB.Frame fraSample1
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3180
- Left = 180
- TabIndex = 11
- Top = 105
- Width = 5325
- Begin VB.TextBox txtOwn
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 1
- Left = 1320
- TabIndex = 1
- Top = 968
- Width = 3720
- End
- Begin VB.TextBox txtOwn
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 2
- Left = 1320
- TabIndex = 2
- Top = 1493
- Width = 3720
- End
- Begin VB.TextBox txtOwn
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 3
- Left = 1320
- TabIndex = 3
- Top = 2018
- Width = 3720
- End
- Begin VB.TextBox txtOwn
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 5
- Left = 3780
- TabIndex = 5
- Top = 2543
- Width = 1230
- End
- Begin VB.TextBox txtOwn
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 4
- Left = 1320
- TabIndex = 4
- Top = 2543
- Width = 1230
- End
- Begin VB.TextBox txtOwn
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 315
- Index = 0
- Left = 1320
- TabIndex = 0
- Top = 413
- Width = 3720
- 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 = 5
- Left = 2775
- TabIndex = 23
- Top = 2595
- 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 = 4
- Left = 315
- TabIndex = 22
- Top = 2595
- 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 = 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