home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Microsoft Plateform / Visual Basic 5.0 / Msvb50.ace / msvb50 / MSVB50 / VB / TEMPLATE / FORMS / OPTION.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-24  |  7.4 KB  |  222 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "comctl32.ocx"
  3. Begin VB.Form frmOptions 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Options"
  6.    ClientHeight    =   4920
  7.    ClientLeft      =   2565
  8.    ClientTop       =   1500
  9.    ClientWidth     =   6150
  10.    Icon            =   "Option.frx":0000
  11.    KeyPreview      =   -1  'True
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   4920
  16.    ScaleWidth      =   6150
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   2  'CenterScreen
  19.    Begin VB.PictureBox picOptions 
  20.       BorderStyle     =   0  'None
  21.       Height          =   3780
  22.       Index           =   3
  23.       Left            =   -20000
  24.       ScaleHeight     =   3780
  25.       ScaleWidth      =   5685
  26.       TabIndex        =   8
  27.       TabStop         =   0   'False
  28.       Top             =   480
  29.       Width           =   5685
  30.       Begin VB.Frame fraSample4 
  31.          Caption         =   "Sample 4"
  32.          Height          =   1785
  33.          Left            =   2100
  34.          TabIndex        =   11
  35.          Top             =   840
  36.          Width           =   2055
  37.       End
  38.    End
  39.    Begin VB.PictureBox picOptions 
  40.       BorderStyle     =   0  'None
  41.       Height          =   3780
  42.       Index           =   2
  43.       Left            =   -20000
  44.       ScaleHeight     =   3780
  45.       ScaleWidth      =   5685
  46.       TabIndex        =   7
  47.       TabStop         =   0   'False
  48.       Top             =   480
  49.       Width           =   5685
  50.       Begin VB.Frame fraSample3 
  51.          Caption         =   "Sample 3"
  52.          Height          =   1785
  53.          Left            =   1545
  54.          TabIndex        =   10
  55.          Top             =   675
  56.          Width           =   2055
  57.       End
  58.    End
  59.    Begin VB.PictureBox picOptions 
  60.       BorderStyle     =   0  'None
  61.       Height          =   3780
  62.       Index           =   1
  63.       Left            =   -20000
  64.       ScaleHeight     =   3780
  65.       ScaleWidth      =   5685
  66.       TabIndex        =   6
  67.       TabStop         =   0   'False
  68.       Top             =   480
  69.       Width           =   5685
  70.       Begin VB.Frame fraSample2 
  71.          Caption         =   "Sample 2"
  72.          Height          =   1785
  73.          Left            =   645
  74.          TabIndex        =   9
  75.          Top             =   300
  76.          Width           =   2055
  77.       End
  78.    End
  79.    Begin VB.PictureBox picOptions 
  80.       BorderStyle     =   0  'None
  81.       Height          =   3780
  82.       Index           =   0
  83.       Left            =   210
  84.       ScaleHeight     =   3780
  85.       ScaleWidth      =   5685
  86.       TabIndex        =   4
  87.       TabStop         =   0   'False
  88.       Top             =   480
  89.       Width           =   5685
  90.       Begin VB.Frame fraSample1 
  91.          Caption         =   "Sample 1"
  92.          Height          =   1785
  93.          Left            =   210
  94.          TabIndex        =   5
  95.          Top             =   255
  96.          Width           =   2055
  97.       End
  98.    End
  99.    Begin VB.CommandButton cmdApply 
  100.       Caption         =   "Apply"
  101.       Height          =   375
  102.       Left            =   4920
  103.       TabIndex        =   3
  104.       Top             =   4455
  105.       Width           =   1095
  106.    End
  107.    Begin VB.CommandButton cmdCancel 
  108.       Cancel          =   -1  'True
  109.       Caption         =   "Cancel"
  110.       Height          =   375
  111.       Left            =   3720
  112.       TabIndex        =   2
  113.       Top             =   4455
  114.       Width           =   1095
  115.    End
  116.    Begin VB.CommandButton cmdOK 
  117.       Caption         =   "OK"
  118.       Height          =   375
  119.       Left            =   2490
  120.       TabIndex        =   1
  121.       Top             =   4455
  122.       Width           =   1095
  123.    End
  124.    Begin ComctlLib.TabStrip tbsOptions 
  125.       Height          =   4245
  126.       Left            =   105
  127.       TabIndex        =   0
  128.       Top             =   120
  129.       Width           =   5895
  130.       _ExtentX        =   10398
  131.       _ExtentY        =   7488
  132.       BeginProperty Tabs {7791BA51-E020-11CF-8E74-00A0C90F26F8} 
  133.          NumTabs         =   4
  134.          BeginProperty Tab1 {7791BA53-E020-11CF-8E74-00A0C90F26F8} 
  135.             Caption         =   "Group 1"
  136.             Key             =   "Group1"
  137.             Object.Tag             =   ""
  138.             Object.ToolTipText     =   "Set Options for Group 1"
  139.             ImageVarType    =   2
  140.          EndProperty
  141.          BeginProperty Tab2 {7791BA53-E020-11CF-8E74-00A0C90F26F8} 
  142.             Caption         =   "Group 2"
  143.             Key             =   "Group2"
  144.             Object.Tag             =   ""
  145.             Object.ToolTipText     =   "Set Options for Group 2"
  146.             ImageVarType    =   2
  147.          EndProperty
  148.          BeginProperty Tab3 {7791BA53-E020-11CF-8E74-00A0C90F26F8} 
  149.             Caption         =   "Group 3"
  150.             Key             =   "Group3"
  151.             Object.Tag             =   ""
  152.             Object.ToolTipText     =   "Set Options for Group 3"
  153.             ImageVarType    =   2
  154.          EndProperty
  155.          BeginProperty Tab4 {7791BA53-E020-11CF-8E74-00A0C90F26F8} 
  156.             Caption         =   "Group 4"
  157.             Key             =   "Group4"
  158.             Object.Tag             =   ""
  159.             Object.ToolTipText     =   "Set Options for Group 4"
  160.             ImageVarType    =   2
  161.          EndProperty
  162.       EndProperty
  163.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  164.          Name            =   "MS Sans Serif"
  165.          Size            =   8.25
  166.          Charset         =   0
  167.          Weight          =   400
  168.          Underline       =   0   'False
  169.          Italic          =   0   'False
  170.          Strikethrough   =   0   'False
  171.       EndProperty
  172.       MouseIcon       =   "Option.frx":000C
  173.    End
  174. Attribute VB_Name = "frmOptions"
  175. Attribute VB_GlobalNameSpace = False
  176. Attribute VB_Creatable = False
  177. Attribute VB_PredeclaredId = True
  178. Attribute VB_Exposed = False
  179. Option Explicit
  180. Private Sub cmdApply_Click()
  181.     MsgBox "Place code here to set options w/o closing dialog!"
  182. End Sub
  183. Private Sub cmdCancel_Click()
  184.     Unload Me
  185. End Sub
  186. Private Sub cmdOK_Click()
  187.     MsgBox "Place code here to set options and close dialog!"
  188.     Unload Me
  189. End Sub
  190. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  191.     Dim i As Integer
  192.     'handle ctrl+tab to move to the next tab
  193.     If Shift = vbCtrlMask And KeyCode = vbKeyTab Then
  194.         i = tbsOptions.SelectedItem.Index
  195.         If i = tbsOptions.Tabs.Count Then
  196.             'last tab so we need to wrap to tab 1
  197.             Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
  198.         Else
  199.             'increment the tab
  200.             Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
  201.         End If
  202.     End If
  203. End Sub
  204. Private Sub Form_Load()
  205.     'center the form
  206.     Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
  207. End Sub
  208. Private Sub tbsOptions_Click()
  209.     Dim i As Integer
  210.     'show and enable the selected tab's controls
  211.     'and hide and disable all others
  212.     For i = 0 To tbsOptions.Tabs.Count - 1
  213.         If i = tbsOptions.SelectedItem.Index - 1 Then
  214.             picOptions(i).Left = 210
  215.             picOptions(i).Enabled = True
  216.         Else
  217.             picOptions(i).Left = -20000
  218.             picOptions(i).Enabled = False
  219.         End If
  220.     Next
  221. End Sub
  222.