home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch14 / olertime / frmtype.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-07-06  |  3.4 KB  |  117 lines

  1. VERSION 5.00
  2. Begin VB.Form frmType 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Object Type"
  5.    ClientHeight    =   2535
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   2655
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   2535
  13.    ScaleWidth      =   2655
  14.    StartUpPosition =   3  'Windows Default
  15.    Begin VB.CommandButton cmdCancel 
  16.       Cancel          =   -1  'True
  17.       Caption         =   "Cancel"
  18.       Height          =   375
  19.       Left            =   1440
  20.       TabIndex        =   7
  21.       Top             =   2040
  22.       Width           =   1095
  23.    End
  24.    Begin VB.CommandButton cmdOK 
  25.       Caption         =   "OK"
  26.       Default         =   -1  'True
  27.       Height          =   375
  28.       Left            =   120
  29.       TabIndex        =   6
  30.       Top             =   2040
  31.       Width           =   1095
  32.    End
  33.    Begin VB.Frame fraType 
  34.       Caption         =   "Object Type"
  35.       Height          =   855
  36.       Left            =   120
  37.       TabIndex        =   3
  38.       Top             =   1080
  39.       Width           =   2415
  40.       Begin VB.OptionButton optTypeLinked 
  41.          Caption         =   "&Linked"
  42.          Height          =   255
  43.          Left            =   120
  44.          TabIndex        =   5
  45.          Top             =   480
  46.          Width           =   975
  47.       End
  48.       Begin VB.OptionButton optTypeEmbedded 
  49.          Caption         =   "&Embedded"
  50.          Height          =   255
  51.          Left            =   120
  52.          TabIndex        =   4
  53.          Top             =   240
  54.          Width           =   1095
  55.       End
  56.    End
  57.    Begin VB.Frame fraSizeMode 
  58.       Caption         =   "Size Mode"
  59.       Height          =   855
  60.       Left            =   120
  61.       TabIndex        =   0
  62.       Top             =   120
  63.       Width           =   2415
  64.       Begin VB.OptionButton optScretchCC 
  65.          Caption         =   "Stretch Container &Control"
  66.          Height          =   255
  67.          Left            =   120
  68.          TabIndex        =   2
  69.          Top             =   480
  70.          Width           =   2175
  71.       End
  72.       Begin VB.OptionButton optStretchObject 
  73.          Caption         =   "Stretch &Object"
  74.          Height          =   255
  75.          Left            =   120
  76.          TabIndex        =   1
  77.          Top             =   240
  78.          Value           =   -1  'True
  79.          Width           =   1335
  80.       End
  81.    End
  82. Attribute VB_Name = "frmType"
  83. Attribute VB_GlobalNameSpace = False
  84. Attribute VB_Creatable = False
  85. Attribute VB_PredeclaredId = True
  86. Attribute VB_Exposed = False
  87. Option Explicit
  88. Private Sub cmdCancel_Click()
  89.     Unload frmType
  90. End Sub
  91. Private Sub cmdOK_Click()
  92.     If optStretchObject.Value = True Then
  93.         'SizeMode=
  94.             '1-Stretch
  95.             '2-Autosize
  96.         frmOLE.oleDisplay.SizeMode = 1
  97.     Else
  98.         frmOLE.oleDisplay.SizeMode = 2
  99.     End If
  100.     If optTypeEmbedded.Value = True Then
  101.         'OLETypeAllowed=
  102.             '0-linked
  103.             '1-embedded
  104.         frmOLE.oleDisplay.OLETypeAllowed = 1
  105.     Else
  106.         frmOLE.oleDisplay.OLETypeAllowed = 0
  107.     End If
  108.     'Hide frmType
  109.     frmType.Hide
  110.     'Insert Object
  111.     frmOLE.oleDisplay.InsertObjDlg
  112.     If frmOLE.oleDisplay.Class <> "" Then
  113.         frmOLE.cmdObjInfo.Enabled = True
  114.     End If
  115.     Unload frmType
  116. End Sub
  117.