Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Display and activate a dialog previously created with DIALOG NEW ..., allowing it to receive user input and messages.

Execution of the code continues at the same time as the dialog is displayed.

 

Syntax

 

DIALOG SHOW MODELESS hwnd [[,] CALL cbFunction]

 

Returns

 

None

 

Parameters

 

Name

Type

Optional

Meaning

hwnd

Number

No

Handle of the dialog created with DIALOG NEW ... statement

cbFunction

Function

Yes

Name of the function that to which dialog messages will be routed to.

The nominated callback function name must be a CALLBACK FUNCTION or a run-time  error will occur.

The name of the callback function can be also specified as a string expression allowing great flexibility.

 

Remarks

 

Execution of the program continues at the same time as the dialog is displayed.

Modeless dialogs require a message pump to be running for the duration of the dialog.

 

Restrictions

 

See also

 

Examples

 

'----------------------------------------------------

'---Single modeless dialog message pump example.

'---(Assume dialog already created with DIALOG NEW ...)

'----------------------------------------------------

  DIALOG SHOW MODELESS hDlg Call DlgCallback

  Do

    DIALOG DOEVENTS 0 To Count

  Loop While Count

  ' Application code continues here...

'----------------------------------------------------

 

 

'----------------------------------------------------

'---Multiple modeless dialog message pump example.

'---In some applications, the number of modeless dialogs can vary,

'---we want to break the message loop when the 'main' dialog is closed.

'---(Assume dialogs already created with DIALOG NEW ...)

  DIALOG SHOW MODELESS hMainDlg Call DlgCallback

  DIALOG SHOW MODELESS hChildDlg1

  DIALOG SHOW MODELESS hChildDlg2

  ...

  Do

    DIALOG DOEVENTS

    DIALOG Get SIZE hMainDlg To x, x

  Loop While x       '---When x = 0, dialog has ended

  ' Application code continues here...

'----------------------------------------------------

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software