www.pudn.com > 2005.rar > frmOptions.frm, change:2007-06-18,size:7143b


VERSION 5.00 
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" 
Begin VB.Form frmOptions  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "选项" 
   ClientHeight    =   4965 
   ClientLeft      =   45 
   ClientTop       =   405 
   ClientWidth     =   6150 
   KeyPreview      =   -1  'True 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   4965 
   ScaleWidth      =   6150 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   1  '所有者中心 
   Tag             =   "选项" 
   Begin VB.CommandButton cmdOK  
      Caption         =   "确定" 
      Height          =   375 
      Left            =   2490 
      TabIndex        =   1 
      Tag             =   "确定" 
      Top             =   4455 
      Width           =   1095 
   End 
   Begin VB.CommandButton cmdCancel  
      Cancel          =   -1  'True 
      Caption         =   "取消" 
      Height          =   375 
      Left            =   3720 
      TabIndex        =   3 
      Tag             =   "取消" 
      Top             =   4455 
      Width           =   1095 
   End 
   Begin VB.CommandButton cmdApply  
      Caption         =   "应用(&A)" 
      Height          =   375 
      Left            =   4920 
      TabIndex        =   5 
      Tag             =   "应用(&A)" 
      Top             =   4455 
      Width           =   1095 
   End 
   Begin VB.PictureBox picOptions  
      BorderStyle     =   0  'None 
      Height          =   3780 
      Index           =   3 
      Left            =   -20000 
      ScaleHeight     =   3840.968 
      ScaleMode       =   0  'User 
      ScaleWidth      =   5745.64 
      TabIndex        =   7 
      TabStop         =   0   'False 
      Top             =   480 
      Width           =   5685 
      Begin VB.Frame fraSample4  
         Caption         =   "示例 4" 
         Height          =   2022 
         Left            =   505 
         TabIndex        =   11 
         Tag             =   "示例 4" 
         Top             =   502 
         Width           =   2033 
      End 
   End 
   Begin VB.PictureBox picOptions  
      BorderStyle     =   0  'None 
      Height          =   3780 
      Index           =   2 
      Left            =   -20000 
      ScaleHeight     =   3840.968 
      ScaleMode       =   0  'User 
      ScaleWidth      =   5745.64 
      TabIndex        =   9 
      TabStop         =   0   'False 
      Top             =   480 
      Width           =   5685 
      Begin VB.Frame fraSample3  
         Caption         =   "示例 3" 
         Height          =   2022 
         Left            =   406 
         TabIndex        =   10 
         Tag             =   "示例 3" 
         Top             =   403 
         Width           =   2033 
      End 
   End 
   Begin VB.PictureBox picOptions  
      BorderStyle     =   0  'None 
      Height          =   3780 
      Index           =   1 
      Left            =   -20000 
      ScaleHeight     =   3840.968 
      ScaleMode       =   0  'User 
      ScaleWidth      =   5745.64 
      TabIndex        =   6 
      TabStop         =   0   'False 
      Top             =   480 
      Width           =   5685 
      Begin VB.Frame fraSample2  
         Caption         =   "示例 2" 
         Height          =   2022 
         Left            =   307 
         TabIndex        =   8 
         Tag             =   "示例 2" 
         Top             =   305 
         Width           =   2033 
      End 
   End 
   Begin VB.PictureBox picOptions  
      BorderStyle     =   0  'None 
      Height          =   3780 
      Index           =   0 
      Left            =   210 
      ScaleHeight     =   3840.968 
      ScaleMode       =   0  'User 
      ScaleWidth      =   5745.64 
      TabIndex        =   2 
      TabStop         =   0   'False 
      Top             =   480 
      Width           =   5685 
      Begin VB.Frame fraSample1  
         Caption         =   "示例 1" 
         Height          =   2022 
         Left            =   208 
         TabIndex        =   4 
         Tag             =   "示例 1" 
         Top             =   207 
         Width           =   2033 
      End 
   End 
   Begin MSComctlLib.TabStrip tbsOptions  
      Height          =   4245 
      Left            =   120 
      TabIndex        =   0 
      Top             =   120 
      Width           =   5895 
      _ExtentX        =   10398 
      _ExtentY        =   7488 
      _Version        =   393216 
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}  
         NumTabs         =   4 
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}  
            Caption         =   "组 1" 
            ImageVarType    =   2 
         EndProperty 
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628}  
            Caption         =   "组 2" 
            ImageVarType    =   2 
         EndProperty 
         BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628}  
            Caption         =   "组 3" 
            ImageVarType    =   2 
         EndProperty 
         BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628}  
            Caption         =   "组 4" 
            ImageVarType    =   2 
         EndProperty 
      EndProperty 
   End 
End 
Attribute VB_Name = "frmOptions" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Sub cmdApply_Click() 
    'ToDo: 添加 'cmdApply_Click' 代码 
    MsgBox "此处添加代码,设置选项无需关闭对话框!" 
End Sub 
 
 
Private Sub cmdCancel_Click() 
    Unload Me 
End Sub 
 
 
Private Sub cmdOK_Click() 
    'ToDo: 添加 'cmdOK_Click' 代码 
    MsgBox "此处添加代码,设置选项并关闭对话框!" 
    Unload Me 
End Sub 
 
 
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 
    Dim i As Integer 
    i = tbsOptions.SelectedItem.Index 
    '处理 ctrl+tab 移到下一 tab 
    If (Shift And 3) = 2 And KeyCode = vbKeyTab Then 
        If i = tbsOptions.Tabs.Count Then 
            '已是最后的 tab 所以需要折回到 tab 1 
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(1) 
        Else 
            '递增 tab 
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1) 
        End If 
    ElseIf (Shift And 3) = 3 And KeyCode = vbKeyTab Then 
        If i = 1 Then 
            '已是最后的 tab 所以需要折回到 tab 1 
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(tbsOptions.Tabs.Count) 
        Else 
            '递增 tab 
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(i - 1) 
        End If 
    End If 
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