⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmtype.frm

📁 OLE的使用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmType 
   Caption         =   "Object Type"
   ClientHeight    =   3492
   ClientLeft      =   60
   ClientTop       =   348
   ClientWidth     =   3636
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3492
   ScaleWidth      =   3636
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton CommandCancel 
      Caption         =   "放弃"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2280
      TabIndex        =   7
      Top             =   2880
      Width           =   975
   End
   Begin VB.CommandButton CommandOK 
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   6
      Top             =   2880
      Width           =   975
   End
   Begin VB.Frame Frame2 
      Caption         =   "对象类型"
      Height          =   1215
      Left            =   360
      TabIndex        =   3
      Top             =   1440
      Width           =   2895
      Begin VB.OptionButton OptionTypeEmbedded 
         Caption         =   "链接"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.8
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   1
         Left            =   360
         TabIndex        =   5
         Top             =   720
         Width           =   2175
      End
      Begin VB.OptionButton OptionTypeEmbedded 
         Caption         =   "嵌入"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.8
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   360
         TabIndex        =   4
         Top             =   240
         Value           =   -1  'True
         Width           =   2175
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "缩放模式"
      Height          =   1215
      Left            =   360
      TabIndex        =   0
      Top             =   120
      Width           =   2892
      Begin VB.OptionButton OptionStretchObjec 
         Caption         =   "缩放容器"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.8
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   1
         Left            =   360
         TabIndex        =   2
         Top             =   600
         Width           =   2412
      End
      Begin VB.OptionButton OptionStretchObjec 
         Caption         =   "缩放对象"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.8
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   360
         TabIndex        =   1
         Top             =   240
         Value           =   -1  'True
         Width           =   1752
      End
   End
End
Attribute VB_Name = "frmType"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub CommandCancel_Click()
Unload Me
End Sub

Private Sub CommandOK_Click()
    With frmOLE.OLE1
        .Height = frmOLE.OLEHeight
        .Width = frmOLE.OLEWidth
    End With
    If (OptionStretchObjec(0).Value = True) Then
        frmOLE.OLE1.SizeMode = 1    '1-Stretch
    Else
        frmOLE.OLE1.SizeMode = 2    '2-Autosize
    End If
    
    If (OptionTypeEmbedded(0).Value = True) Then
        frmOLE.OLE1.OLETypeAllowed = 1  '0-Linked
    Else
        frmOLE.OLE1.OLETypeAllowed = 0  '1-Embedded
    End If
    
    Me.Hide                    '隐藏窗体
    frmOLE.OLE1.InsertObjDlg
    If (frmOLE.OLE1.Class <> "") Then
        frmOLE.CommandObjInfo.Enabled = True
    End If
    Unload Me
End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -