应用于 PageWindowEx 对象的 ViewMode 属性。
返回或设置 FpPageViewMode 常数,该常数代表当前网页窗口的视图模式。可读写。
FpPageViewMode 可以是下列这些 FpPageViewMode 常数之一: |
fpPageViewNoFrames |
fpPageViewNormal |
fpPageViewNoWindow |
fpPageViewPreview |
fpPageViewDefault |
fpPageViewHtml |
expression.ViewMode
expression 必选。返回 PageWindowEx 对象的表达式。
应用于 WebWindowEx 对象的 ViewMode 属性。
返回或设置一个 FpWebViewMode 常数,该常数用来定义当前窗口的视图模式。可读写。
FpWebViewMode 可以是下列这些 FpWebViewMode 常数之一: |
fpWebViewAllFiles |
fpWebViewBrokenLinks |
fpWebViewFolders |
fpWebViewLinks |
fpWebViewPage |
fpWebViewSiteSummary |
fpWebViewStructure |
fpWebViewTodo |
expression.ViewMode
expression 必选。返回 WebWindowEx 对象的表达式。
应用于 DispFPHTMLDocument 对象的 ViewMode 属性。
返回 Long 类型的值,该值代表文档的视图模式。只读。
expression.ViewMode(ViewMode)
expression 必选。返回 DispFPHTMLDocument 对象的表达式。
ViewMode 必选,Long 类型。表示新视图模式。
在以下的示例中,如果当前窗口不在默认视图模式下,则将其更改为值 fpPageViewNormal(普通视图)。
Sub ChangeViewMode()
'Changes the view mode of the active window
Dim fpApp As FrontPage.Application
Dim objPage As PageWindowEx
Set fpApp = FrontPage.Application
Set objPage = fpApp.ActivePageWindow
If objPage.ViewMode <> fpPageViewDefault Then
objPage.ViewMode = fpPageViewNormal
MsgBox "The current page window has been restored " & _
"to normal view."
End If
End Sub
在以下示例中,如果当前站点窗口不在视图中,则将其视图模式更改为 fpWebBrokenLinks(断开的链接视图)。
Sub ChangeViewMode()
'Changes the view mode of the active window
Dim fpApp As FrontPage.Application
Dim objWebWindow As WebWindowEx
Set fpApp = FrontPage.Application
Set objWebWindow = fpApp.ActiveWebWindow
If objWebWindow.ViewMode <> fpWebViewBrokenLinks Then
objWebWindow.ViewMode = fpWebViewBrokenLinks
MsgBox "The current page window has been restored " & _
"to Broken Links view."
End If
End Sub
将该方法应用于 DispFPHTMLDocument 对象。
以下示例显示活动文档的视图模式。
Sub DisplayViewMode()
'Changes the view mode of the active window
Dim fpApp As FrontPage.Application
Dim objDoc As DispFPHTMLDocument
Set fpApp = FrontPage.Application
Set objDoc = fpApp.ActiveDocument
Select Case objDoc.ViewMode
Case 1
MsgBox "The document is in Normal mode."
Case 2
MsgBox "The document is in HTML mode"
Case 8
MsgBox "The document is in Preview mode"
End Select
End Sub