home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form frmOptions
- BorderStyle = 3 'Fixed Dialog
- Caption = "Options"
- ClientHeight = 4920
- ClientLeft = 2565
- ClientTop = 1500
- ClientWidth = 6150
- Icon = "frmOptions.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4920
- ScaleWidth = 6150
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin TabDlg.SSTab SSTab1
- Height = 4335
- Left = 0
- TabIndex = 9
- Top = 0
- Width = 6135
- _ExtentX = 10821
- _ExtentY = 7646
- _Version = 393216
- TabHeight = 520
- TabCaption(0) = "Tab 0"
- TabPicture(0) = "frmOptions.frx":000C
- Tab(0).ControlEnabled= -1 'True
- Tab(0).Control(0)= "Frame1"
- Tab(0).Control(0).Enabled= 0 'False
- Tab(0).ControlCount= 1
- TabCaption(1) = "Tab 1"
- Tab(1).ControlEnabled= 0 'False
- Tab(1).ControlCount= 0
- TabCaption(2) = "Tab 2"
- Tab(2).ControlEnabled= 0 'False
- Tab(2).ControlCount= 0
- Begin VB.Frame Frame1
- Caption = "Frame1"
- Height = 3735
- Left = 120
- TabIndex = 10
- Top = 480
- Width = 5895
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 3
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 5
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample4
- Caption = "Sample 4"
- Height = 1785
- Left = 2100
- TabIndex = 8
- Top = 840
- Width = 2055
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 2
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 4
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample3
- Caption = "Sample 3"
- Height = 1785
- Left = 1545
- TabIndex = 7
- Top = 675
- Width = 2055
- End
- End
- Begin VB.PictureBox picOptions
- BorderStyle = 0 'None
- Height = 3780
- Index = 1
- Left = -20000
- ScaleHeight = 3780
- ScaleWidth = 5685
- TabIndex = 3
- TabStop = 0 'False
- Top = 480
- Width = 5685
- Begin VB.Frame fraSample2
- Caption = "Sample 2"
- Height = 1785
- Left = 645
- TabIndex = 6
- Top = 300
- Width = 2055
- End
- End
- Begin VB.CommandButton cmdApply
- Caption = "Apply"
- Height = 375
- Left = 4920
- TabIndex = 2
- Top = 4455
- Width = 1095
- End
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 375
- Left = 3720
- TabIndex = 1
- Top = 4455
- Width = 1095
- End
- Begin VB.CommandButton cmdOK
- Caption = "OK"
- Height = 375
- Left = 2490
- TabIndex = 0
- Top = 4455
- Width = 1095
- End
- Attribute VB_Name = "frmOptions"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdApply_Click()
- MsgBox "Place code here to set options w/o closing dialog!"
- End Sub
- Private Sub cmdCancel_Click()
- Unload Me
- End Sub
- Private Sub cmdOK_Click()
- MsgBox "Place code here to set options and close dialog!"
- Unload Me
- End Sub
- Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
- Dim i As Integer
- 'handle ctrl+tab to move to the next tab
- If Shift = vbCtrlMask And KeyCode = vbKeyTab Then
- i = tbsOptions.SelectedItem.Index
- If i = tbsOptions.Tabs.Count Then
- 'last tab so we need to wrap to tab 1
- Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
- Else
- 'increment the tab
- Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
- End If
- End If
- End Sub
- Private Sub Form_Load()
- 'center the form
- Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
- End Sub
- Private Sub tbsOptions_Click()
- Dim i As Integer
- 'show and enable the selected tab's controls
- 'and hide and disable all others
- 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
-