Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

Kind property

Project: Message Dialogue Components.

Unit: PJMessageDialog.

Class: TPJWinMsgDlg

Applies to: ~>3.0

type
  TPJMsgDlgKind = (
    mkWarning, mkInformation, mkQuery, mkError, mkUser,
    mkApplication, mkWinLogo, mkUnknown
  );

property Kind: TPJMsgDlgKind;

Description

This property determines the appearance and other attributes of the dialogue box. The property specifies the icon that will appear in the dialogue box, the default window title and any sound played when the dialogue box is displayed. The default window title can be overridden using the Title property and sounds are only played when MakeSound is True.

The effect of each of the possible values of the Kind property are described below:

Value Icon Default title System Sound
mkWarning System exclamation icon “Warning” MB_ICONEXCLAMATION
mkInformation System information icon “Information” MB_ICONASTERISK
mkQuery System confirmation icon “Confirm” MB_ICONQUESTION
mkError System error icon “Error” MB_ICONHAND
mkUser Specified by IconResource property Per Application.Title property MB_OK
mkApplication System application icon Per Application.Title property MB_OK
mkWinLogo System Windows icon Per Application.Title property MB_OK
mkUnknown None Per Application.Title property MB_OK

Setting Kind also updates the DlgType property and vice versa. See the DlgType page for full details.

Notes:

  1. When Kind = mkUser, the icon is loaded from the resource specified by the IconResource property.
  2. The appearance of system icons is operating system version dependent. On some Windows versions, the icon displayed for mkApplication and mkWinLogo is the same.
  3. Sounds are also operation system version and theme dependent. Some themes play no sound for some MB_XXX values.
  4. mkUnknown should not be selected explicitly. It is present to signal that an invalid dialogue kind has been specified when setting the DlgType property.

The default value of the property is mkInformation.