home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / activex / demos / oletrial / samples / vb / mhavi / foptions.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-12  |  4.8 KB  |  161 lines

  1. VERSION 4.00
  2. Begin VB.Form fOptions 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   915
  6.    ClientLeft      =   1395
  7.    ClientTop       =   6585
  8.    ClientWidth     =   6990
  9.    Height          =   1320
  10.    Left            =   1335
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   915
  15.    ScaleWidth      =   6990
  16.    ShowInTaskbar   =   0   'False
  17.    Top             =   6240
  18.    Width           =   7110
  19.    Begin VB.Frame frmInnerBevel 
  20.       Caption         =   "Frame1"
  21.       Height          =   615
  22.       Left            =   4680
  23.       TabIndex        =   4
  24.       Top             =   120
  25.       Width           =   2175
  26.       Begin VB.OptionButton optInnerBevel 
  27.          Caption         =   "Option2"
  28.          Height          =   255
  29.          Index           =   1
  30.          Left            =   1080
  31.          TabIndex        =   8
  32.          Top             =   240
  33.          Width           =   975
  34.       End
  35.       Begin VB.OptionButton optInnerBevel 
  36.          Caption         =   "Option2"
  37.          Height          =   255
  38.          Index           =   0
  39.          Left            =   120
  40.          TabIndex        =   7
  41.          Top             =   240
  42.          Width           =   975
  43.       End
  44.    End
  45.    Begin VB.Frame frmOuterBevel 
  46.       Caption         =   "Frame1"
  47.       Height          =   615
  48.       Left            =   2400
  49.       TabIndex        =   3
  50.       Top             =   120
  51.       Width           =   2175
  52.       Begin VB.OptionButton optOuterBevel 
  53.          Caption         =   "Option1"
  54.          Height          =   255
  55.          Index           =   1
  56.          Left            =   1080
  57.          TabIndex        =   6
  58.          Top             =   240
  59.          Width           =   855
  60.       End
  61.       Begin VB.OptionButton optOuterBevel 
  62.          Caption         =   "Option1"
  63.          Height          =   255
  64.          Index           =   0
  65.          Left            =   120
  66.          TabIndex        =   5
  67.          Top             =   240
  68.          Width           =   855
  69.       End
  70.    End
  71.    Begin VB.Frame frmBorder 
  72.       Caption         =   "Frame1"
  73.       Height          =   615
  74.       Left            =   120
  75.       TabIndex        =   0
  76.       Top             =   120
  77.       Width           =   2175
  78.       Begin VB.OptionButton optBorder 
  79.          Caption         =   "Option1"
  80.          Height          =   255
  81.          Index           =   1
  82.          Left            =   1080
  83.          TabIndex        =   2
  84.          Top             =   240
  85.          Width           =   975
  86.       End
  87.       Begin VB.OptionButton optBorder 
  88.          Caption         =   "Option1"
  89.          Height          =   255
  90.          Index           =   0
  91.          Left            =   120
  92.          TabIndex        =   1
  93.          Top             =   240
  94.          Width           =   975
  95.       End
  96.    End
  97. Attribute VB_Name = "fOptions"
  98. Attribute VB_Creatable = False
  99. Attribute VB_Exposed = False
  100. Private Sub Form_Activate()
  101.     'Set default values for option buttons to match
  102.     'current settings for MhAVI control
  103.     If fMhAVI!MhAVI1.BorderStyle <> 0 Then
  104.         optBorder(0).Value = True
  105.     Else
  106.         optBorder(1).Value = True
  107.     End If
  108.     If fMhAVI!MhAVI1.BevelSize <> 0 Then
  109.         optOuterBevel(0).Value = True
  110.     Else
  111.         optOuterBevel(1).Value = True
  112.     End If
  113.     If fMhAVI!MhAVI1.BevelSizeInner <> 0 Then
  114.         optInnerBevel(0).Value = True
  115.     Else
  116.         optInnerBevel(1).Value = True
  117.     End If
  118.     fOptions.SetFocus
  119. End Sub
  120. Private Sub Form_Load()
  121. 'Initialize form
  122.     fOptions.Caption = "MhAVI Options"
  123.     frmBorder.Caption = "Set Border Style"
  124.     optBorder(0).Caption = "Show"
  125.     optBorder(1).Caption = "Hide"
  126.     frmOuterBevel.Caption = "Set Outer Bevel"
  127.     optOuterBevel(0).Caption = "Show"
  128.     optOuterBevel(1).Caption = "Hide"
  129.     frmInnerBevel.Caption = "Set Inner Bevel"
  130.     optInnerBevel(0).Caption = "Show"
  131.     optInnerBevel(1).Caption = "Hide"
  132.     CenterForm ("fOptions")
  133. End Sub
  134. Private Sub optBorder_Click(Index As Integer)
  135. 'Set border style
  136.     Select Case Index
  137.         Case 0
  138.             fMhAVI!MhAVI1.BorderStyle = ig_BORDER
  139.         Case 1
  140.             fMhAVI!MhAVI1.BorderStyle = ig_NO_BORDER
  141.     End Select
  142. End Sub
  143. Private Sub optInnerBevel_Click(Index As Integer)
  144. 'Set inner Bevel size
  145.     Select Case Index
  146.         Case 0
  147.             fMhAVI!MhAVI1.BevelSizeInner = 2
  148.         Case 1
  149.             fMhAVI!MhAVI1.BevelSizeInner = 0
  150.     End Select
  151. End Sub
  152. Private Sub optOuterBevel_Click(Index As Integer)
  153. 'Set outer Bevel size
  154.     Select Case Index
  155.         Case 0
  156.             fMhAVI!MhAVI1.BevelSize = 2
  157.         Case 1
  158.             fMhAVI!MhAVI1.BevelSize = 0
  159.     End Select
  160. End Sub
  161.