Result = OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Title$ [, Flags [, ParentWindowID]])
Opens a new window according to the specified parameters. The new window becomes the active window, it's not needed to use SetActiveWindow() (unless the window is created as invisible).


#Window A number to identify the new window. #PB_Any can be used to auto-generate this number.
x, y The initial position of the window, in pixels (unless one of the center flags is used). If 'x' or 'y' is set to #PB_Ignore, the OS will choose a position for the window.
InnerWidth, InnerHeight The required client area, in pixels (without borders and window decorations).
Title$ The title of the newly created window.
Flags (optional) Can be a combination of the following values:
  #PB_Window_SystemMenu    : Enables the system menu on the window title bar (default).
  #PB_Window_Background    : The window doesn't have a frame and is put in the web browser background. It can only have one window
                             with the background flag opened at the same time. This window will be automatically resized when the
                             web browser is resized.
  #PB_Window_SizeGadget    : Adds the sizeable feature to a window.
  #PB_Window_Invisible     : Creates the window but don't display.
  #PB_Window_TitleBar      : Creates a window with a titlebar.
  #PB_Window_BorderLess    : Creates a window without any borders.
  #PB_Window_ScreenCentered: Centers the window in the middle of the screen. x,y parameters are ignored.
  #PB_Window_NoActivate    : Don't activate the window after opening.
  #PB_Window_AllowSelection: Allows text selection on gadgets displaying text (to copy/paste content easily)
  #PB_Window_NoMove        : Disable user window moving (with mouse or touch)
ParentWindowID (optional) This parameter is not supported yet.

Return value

Nonzero if the window was successfully created, zero otherwise. If #PB_Any was used for the #Window parameter then the generated number is returned on success.

See Also


Supported OS


<- IsWindow() - Window Index - PostEvent() ->