Coding in a Windowless Environment
In Microsoft FrontPage, it is possible to create a windowless environment to cut down on User Interface (UI) overhead, but there are some drawbacks to working in such an environment. For example, opening a page with the ViewMode property set to fpPageViewNoWindow, creates a windowless environment where window elements that require the UI won't work correctly. If you open a page without a window and try to access it using code such as PageWindow.Document.ParentWindow
, the resulting code returns nothing instead of returning an FPHTMLWindow2 object. The following statements provide access to windowless pages.
Application.LocatePage(DocumentUrl As String, _
ViewMode As FpPageViewMode) As PageWindowEx
Web.LocatePage(DocumentUrl As String, ViewMode As FPPageViewMode) _
As PageWindowEx
File.Edit(ViewMode As FpPageViewMode) As PageWindowEx
The following table describes the PageWindowEx methods and properties and the objects or error messages they return. Some methods and properties of the PageWindowEx object are disabled in a windowless environment and will return the results shown in the following table.
Disabled Method or Property of the PageWindow Object | Returned Object or Error Message |
---|---|
ActiveDocument | Returns "object or with variable not set" error message. |
ActiveFrameWindow | Returns "object or with variable not set" error message. |
Caption | Returns the URL for the PageWindow object. |
Document | Returns a Document object. |
File | Returns a File object. |
ViewMode | This property can not be set. It returns the constant fpPageViewNoWindow. |
Visible | Returns False. |
Web | Returns the Web object if the object was located using the following statements.
|
ApplyTheme | Returns a run-time error. |
Close(ForceSave) | Closes the page window. |
Refresh(ForceSave) | Refreshes the page window. |
Save(ForceOverwrite) | Saves the page window. |
SaveAs(ForceOverwrite) | Saves the page window to a new URL. |