Coding in a Windowless Environment

See Also

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 to fpPageViewNoWindow with the ViewMode property, creates a windowless environment where Window elements that require the UI won't work corretly. 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 PageWindow
Web.LocatePage(DocumentUrl As String, ViewMode As FPPageViewMode) _
    As PageWindow
File.Edit(ViewMode As FpPageViewMode) As PageWindow

The following table describes the PageWindow methods and properties and the objects or error messages they return. Some methods and properties of the PageWindow 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.
ReadyState Returns the ready state of the document.
ViewMode This property can not be set. It returns the constant fpViewModeNoWindow.
Visible Returns False.
Web Returns the Web object if the object was located using the following statements.

Web.LocatePage

File.Edit

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.