返回或设置 FpWebSubView 常数,该常数确定当前子窗口中的视图类型。可读写。
FpWebSubView 可以是下列这些 FpWebSubView 常数之一。 |
fpWebSubViewFolders 将当前子窗口视图更改为“文件夹”视图。 |
fpWebSubViewNavigation 将当前子窗口更改为“导航”视图。 |
fpWebSubViewNone 关闭当前子窗口。 |
expression.SubViewMode
expression 必选。返回“应用于”列表中的对象之一的表达式。
如果子窗口当前不可见,下列示例会提示用户将子窗口打开为“文件夹”视图。如果子窗口当前已打开,则用户不会得到提示,并且程序将结束。
Sub SubModeType()
'Modifies the sub window view mode of the current web window
Dim objApp As FrontPage.Application
Dim objWebwdw As WebWindowEx
Dim strAns As String
Set objApp = FrontPage.Application
Set objWebwdw = objApp.ActiveWebWindow
'Check if the sub window is open or closed
If objWebwdw.SubViewMode = fpWebSubViewNone Then
strAns = MsgBox("The subwindow is not visible." & _
"Would you like to view the subwindow?", vbYesNo)
'Prompt the user to open the subwindow
If strAns = vbYes Then
'Change the sub window to Folder view
objWebwdw.SubViewMode = fpWebSubViewFolders
End If
End If
End Sub