mdidesk.frm

来自「使用WebBrowser控件作为容器打开Word文档 === === === 」· FRM 代码 · 共 78 行

FRM
78
字号
VERSION 5.00
Begin VB.MDIForm MDIDesk 
   BackColor       =   &H8000000C&
   Caption         =   "使用WebBrowser控件作为容器打开Word文档"
   ClientHeight    =   3510
   ClientLeft      =   1260
   ClientTop       =   630
   ClientWidth     =   5280
   Icon            =   "MDIDesk.frx":0000
   NegotiateToolbars=   0   'False
   ScrollBars      =   0   'False
   Begin VB.Menu mnuFileMenu 
      Caption         =   "文件(&F)"
      Begin VB.Menu mnuFile 
         Caption         =   "新建(&N)"
         Index           =   0
         Shortcut        =   ^N
      End
      Begin VB.Menu mnuFile 
         Caption         =   "示例(&D)"
         Index           =   1
      End
      Begin VB.Menu mnuFile 
         Caption         =   "-"
         Index           =   2
      End
      Begin VB.Menu mnuFile 
         Caption         =   "退出(&X)"
         Index           =   3
      End
   End
End
Attribute VB_Name = "MDIDesk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit
' WbrWord v2.00 (Vb6) Apr 2006 contact markb@orionstudios.com
' Demonstrates using WebBrowser Control as container for MS Word Document
'
' WbrWord.frm is managed by (this) MDI Form to demonstrate that
'   WinWord is started when a Word document is loaded into the frmWbrWord
'   instance and remains active until the frmWbrWord instance is closed.
'   This can be confirmed using Ctrl-Alt-Del to view the task list.
' See Header comments in WbrWord.frm
'=================================================================================

Private Sub MDIForm_Load()

    Me.Move 1200, 0, 9600, 8400
    
End Sub

Private Sub mnuFile_Click(Index As Integer)

    On Error Resume Next
    
    Select Case Index
    
        Case 0  ' Blank WebBrowser Form for loading Word Document
            With New frmWbrWord
                .Show
            End With
            
        Case 1  ' Demo manipulation of Word Document
            With New frmWbrWordDemo
                .Show
            End With
            
        Case 3  ' Exit
            Unload Me
       
    End Select
    
End Sub

⌨️ 快捷键说明

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