home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch13 / olertime / oletype.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1997-02-20  |  3.6 KB  |  123 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.     With frmOLE.oleDisplay
  93.         .Height = 4215
  94.         .Width = 4575
  95.     End With
  96.     If optStretchObject.Value = True Then
  97.         'SizeMode=
  98.             '1-Stretch
  99.             '2-Autosize
  100.         frmOLE.oleDisplay.SizeMode = 1
  101.     Else
  102.         frmOLE.oleDisplay.SizeMode = 2
  103.     End If
  104.     If optTypeEmbedded.Value = True Then
  105.         'OLETypeAllowed=
  106.             '0-linked
  107.             '1-embedded
  108.         frmOLE.oleDisplay.OLETypeAllowed = 1
  109.     Else
  110.         frmOLE.oleDisplay.OLETypeAllowed = 0
  111.     End If
  112.     'Hide frmType
  113.     frmType.Hide
  114.     '(You can also do cmdOK.Parent.Hide)
  115.     '       Hide cmdOK's Parent (frmType)
  116.     'Insert Object
  117.     frmOLE.oleDisplay.InsertObjDlg
  118.     If frmOLE.oleDisplay.Class <> "" Then
  119.         frmOLE.cmdObjInfo.Enabled = True
  120.     End If
  121.     Unload frmType
  122. End Sub
  123.