home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD7388732000.psc / SqlFileCopyWorking / frmOptions.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-02-14  |  5.7 KB  |  183 lines

  1. VERSION 5.00
  2. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.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            =   "frmOptions.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 TabDlg.SSTab SSTab1 
  20.       Height          =   4335
  21.       Left            =   0
  22.       TabIndex        =   9
  23.       Top             =   0
  24.       Width           =   6135
  25.       _ExtentX        =   10821
  26.       _ExtentY        =   7646
  27.       _Version        =   393216
  28.       TabHeight       =   520
  29.       TabCaption(0)   =   "Tab 0"
  30.       TabPicture(0)   =   "frmOptions.frx":000C
  31.       Tab(0).ControlEnabled=   -1  'True
  32.       Tab(0).Control(0)=   "Frame1"
  33.       Tab(0).Control(0).Enabled=   0   'False
  34.       Tab(0).ControlCount=   1
  35.       TabCaption(1)   =   "Tab 1"
  36.       Tab(1).ControlEnabled=   0   'False
  37.       Tab(1).ControlCount=   0
  38.       TabCaption(2)   =   "Tab 2"
  39.       Tab(2).ControlEnabled=   0   'False
  40.       Tab(2).ControlCount=   0
  41.       Begin VB.Frame Frame1 
  42.          Caption         =   "Frame1"
  43.          Height          =   3735
  44.          Left            =   120
  45.          TabIndex        =   10
  46.          Top             =   480
  47.          Width           =   5895
  48.       End
  49.    End
  50.    Begin VB.PictureBox picOptions 
  51.       BorderStyle     =   0  'None
  52.       Height          =   3780
  53.       Index           =   3
  54.       Left            =   -20000
  55.       ScaleHeight     =   3780
  56.       ScaleWidth      =   5685
  57.       TabIndex        =   5
  58.       TabStop         =   0   'False
  59.       Top             =   480
  60.       Width           =   5685
  61.       Begin VB.Frame fraSample4 
  62.          Caption         =   "Sample 4"
  63.          Height          =   1785
  64.          Left            =   2100
  65.          TabIndex        =   8
  66.          Top             =   840
  67.          Width           =   2055
  68.       End
  69.    End
  70.    Begin VB.PictureBox picOptions 
  71.       BorderStyle     =   0  'None
  72.       Height          =   3780
  73.       Index           =   2
  74.       Left            =   -20000
  75.       ScaleHeight     =   3780
  76.       ScaleWidth      =   5685
  77.       TabIndex        =   4
  78.       TabStop         =   0   'False
  79.       Top             =   480
  80.       Width           =   5685
  81.       Begin VB.Frame fraSample3 
  82.          Caption         =   "Sample 3"
  83.          Height          =   1785
  84.          Left            =   1545
  85.          TabIndex        =   7
  86.          Top             =   675
  87.          Width           =   2055
  88.       End
  89.    End
  90.    Begin VB.PictureBox picOptions 
  91.       BorderStyle     =   0  'None
  92.       Height          =   3780
  93.       Index           =   1
  94.       Left            =   -20000
  95.       ScaleHeight     =   3780
  96.       ScaleWidth      =   5685
  97.       TabIndex        =   3
  98.       TabStop         =   0   'False
  99.       Top             =   480
  100.       Width           =   5685
  101.       Begin VB.Frame fraSample2 
  102.          Caption         =   "Sample 2"
  103.          Height          =   1785
  104.          Left            =   645
  105.          TabIndex        =   6
  106.          Top             =   300
  107.          Width           =   2055
  108.       End
  109.    End
  110.    Begin VB.CommandButton cmdApply 
  111.       Caption         =   "Apply"
  112.       Height          =   375
  113.       Left            =   4920
  114.       TabIndex        =   2
  115.       Top             =   4455
  116.       Width           =   1095
  117.    End
  118.    Begin VB.CommandButton cmdCancel 
  119.       Cancel          =   -1  'True
  120.       Caption         =   "Cancel"
  121.       Height          =   375
  122.       Left            =   3720
  123.       TabIndex        =   1
  124.       Top             =   4455
  125.       Width           =   1095
  126.    End
  127.    Begin VB.CommandButton cmdOK 
  128.       Caption         =   "OK"
  129.       Height          =   375
  130.       Left            =   2490
  131.       TabIndex        =   0
  132.       Top             =   4455
  133.       Width           =   1095
  134.    End
  135. Attribute VB_Name = "frmOptions"
  136. Attribute VB_GlobalNameSpace = False
  137. Attribute VB_Creatable = False
  138. Attribute VB_PredeclaredId = True
  139. Attribute VB_Exposed = False
  140. Option Explicit
  141. Private Sub cmdApply_Click()
  142.     MsgBox "Place code here to set options w/o closing dialog!"
  143. End Sub
  144. Private Sub cmdCancel_Click()
  145.     Unload Me
  146. End Sub
  147. Private Sub cmdOK_Click()
  148.     MsgBox "Place code here to set options and close dialog!"
  149.     Unload Me
  150. End Sub
  151. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  152.     Dim i As Integer
  153.     'handle ctrl+tab to move to the next tab
  154.     If Shift = vbCtrlMask And KeyCode = vbKeyTab Then
  155.         i = tbsOptions.SelectedItem.Index
  156.         If i = tbsOptions.Tabs.Count Then
  157.             'last tab so we need to wrap to tab 1
  158.             Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
  159.         Else
  160.             'increment the tab
  161.             Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
  162.         End If
  163.     End If
  164. End Sub
  165. Private Sub Form_Load()
  166.     'center the form
  167.     Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
  168. End Sub
  169. Private Sub tbsOptions_Click()
  170.     Dim i As Integer
  171.     'show and enable the selected tab's controls
  172.     'and hide and disable all others
  173.     For i = 0 To tbsOptions.Tabs.Count - 1
  174.         If i = tbsOptions.SelectedItem.Index - 1 Then
  175.             picOptions(i).Left = 210
  176.             picOptions(i).Enabled = True
  177.         Else
  178.             picOptions(i).Left = -20000
  179.             picOptions(i).Enabled = False
  180.         End If
  181.     Next
  182. End Sub
  183.