Create

>>-aUserDialog~Create(--x--,--y--,--cx--,--cy--,--title--,------>

>--+---------------------------+--,--+----------+--------------->
   |    .-----------------.    |     +-dlgClass-+
   |    V                 |    |
   +-"----+-NOMENU------+-+--"-+
          +-VISIBLE-----+
          +-NOTMODAL----+
          +-SYSTEMMODAL-+
          +-THICKFRAME--+
          +-MINIMIZEBOX-+
          +-MAXIMIZEBOX-+

>--,--+----------+--,--+----------+--,--+----------+--)--------><
      +-fontName-+     +-fontSize-+     +-expected-+


The Create method creates the Windows dialog you previously defined with Add... methods. You can set the size, title, and style of the dialog. If the return code of Create is 0 the dialog creation failed and you should not try to execute the dialog object.

Arguments:

The arguments are:

x, y

The position of the upper-left edge of the dialog in dialog units

cx, cy

The extent (width and height) of the dialog in dialog units

title

The dialog's title that is displayed in the title bar

options

One or more of the keywords listed in the syntax diagram, separated by blanks:

NOMENU

Creates a dialog without a system menu

VISIBLE

Creates a visible dialog

NOTMODAL

Creates a dialog with a normal window frame

SYSTEMMODAL

Creates a dialog that blocks all other windows

THICKFRAME

Creates a dialog with a thick frame

MINIMIZEBOX

Creates a dialog with a minimize button.

MAXIMIZEBOX

Creates a dialog with a maximize button.

dlgClass

Name of the window class used for the dialog. This argument must be omitted or an empty string.

fontName

The name of a font used by the dialog for all text. The default font is System.

fontSize

The size of the font used by the dialog. The default value is 8.

expected

This argument determines the maximum number of dialog elements (static text, entry lines, list boxes, and the like) the dialog can handle. The default value is 200. If your dialog has more than 200 elements, you must set this value; otherwise, the dialog fails.

Example:

The following example creates a dialog with a size of 300 by 200 dialog units. The dialog has no system menu in its upper-left corner. It has a thick frame (therefore the dialog will get resizable) and a 12-point font. The dialog has capabilities for up to 100 elements.

rc = MyDialog~Create(20, 20, 300, 200, "My first Dialog", ,
  "THICKFRAME NOMENU", , "Courier", 12, 100)
if rc <> 0 then MyDialog~Execute