home *** CD-ROM | disk | FTP | other *** search
/ distrib.akp.su/Programming/Vb-6+Rus/ / distrib.akp.su.tar / distrib.akp.su / Programming / Vb-6+Rus / VB98 / TEMPLATE / FORMS / OPTSDLG.FRM < prev    next >
Text File  |  1998-06-27  |  7KB  |  227 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11d2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.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            =   "Options Dialog.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 MSComctlLib.TabStrip tbsOptions 
  125.       Height          =   4245
  126.       Left            =   105
  127.       TabIndex        =   0
  128.       Top             =   120
  129.       Width           =   5895
  130.       _ExtentX        =   10398
  131.       _ExtentY        =   7488
  132.       _Version        =   393216
  133.       BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
  134.          NumTabs         =   4
  135.          BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
  136.             Caption         =   "Group 1"
  137.             Key             =   "Group1"
  138.             Object.ToolTipText     =   "Set Options for Group 1"
  139.             ImageVarType    =   2
  140.          EndProperty
  141.          BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
  142.             Caption         =   "Group 2"
  143.             Key             =   "Group2"
  144.             Object.ToolTipText     =   "Set Options for Group 2"
  145.             ImageVarType    =   2
  146.          EndProperty
  147.          BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
  148.             Caption         =   "Group 3"
  149.             Key             =   "Group3"
  150.             Object.ToolTipText     =   "Set Options for Group 3"
  151.             ImageVarType    =   2
  152.          EndProperty
  153.          BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
  154.             Caption         =   "Group 4"
  155.             Key             =   "Group4"
  156.             Object.ToolTipText     =   "Set Options for Group 4"
  157.             ImageVarType    =   2
  158.          EndProperty
  159.       EndProperty
  160.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  161.          Name            =   "MS Sans Serif"
  162.          Size            =   8.25
  163.          Charset         =   0
  164.          Weight          =   400
  165.          Underline       =   0   'False
  166.          Italic          =   0   'False
  167.          Strikethrough   =   0   'False
  168.       EndProperty
  169.    End
  170. End
  171. Attribute VB_Name = "frmOptions"
  172. Attribute VB_GlobalNameSpace = False
  173. Attribute VB_Creatable = False
  174. Attribute VB_PredeclaredId = True
  175. Attribute VB_Exposed = False
  176. Option Explicit
  177.  
  178. Private Sub cmdApply_Click()
  179.     MsgBox "Place code here to set options w/o closing dialog!"
  180. End Sub
  181.  
  182. Private Sub cmdCancel_Click()
  183.     Unload Me
  184. End Sub
  185.  
  186. Private Sub cmdOK_Click()
  187.     MsgBox "Place code here to set options and close dialog!"
  188.     Unload Me
  189. End Sub
  190.  
  191. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  192.     Dim i As Integer
  193.     'handle ctrl+tab to move to the next tab
  194.     If Shift = vbCtrlMask And KeyCode = vbKeyTab Then
  195.         i = tbsOptions.SelectedItem.Index
  196.         If i = tbsOptions.Tabs.Count Then
  197.             'last tab so we need to wrap to tab 1
  198.             Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
  199.         Else
  200.             'increment the tab
  201.             Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
  202.         End If
  203.     End If
  204. End Sub
  205.  
  206. Private Sub Form_Load()
  207.     'center the form
  208.     Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
  209. End Sub
  210.  
  211. Private Sub tbsOptions_Click()
  212.     
  213.     Dim i As Integer
  214.     'show and enable the selected tab's controls
  215.     'and hide and disable all others
  216.     For i = 0 To tbsOptions.Tabs.Count - 1
  217.         If i = tbsOptions.SelectedItem.Index - 1 Then
  218.             picOptions(i).Left = 210
  219.             picOptions(i).Enabled = True
  220.         Else
  221.             picOptions(i).Left = -20000
  222.             picOptions(i).Enabled = False
  223.         End If
  224.     Next
  225.     
  226. End Sub
  227.