Important Information

JSDialog Pack (VCL) has been aquired by LMD Innovative.

LMD DialogPack homepage



This information is only available for a short period, please update any links to point to the LMD Innovative pages.


So many properties, where do I start?

While JSDialog is a dialog that can emulate the behaviour of the new Windows Vista only TaskDialog and TaskDialogIndirect API calls it also does many things the API does not support. This is why the number of properties the component has, may be a little daunting at first.

While the component editor is a great way to reduce this daunting feeling, it is only available to registered users of the component.

To help get you started here is breakdown of the TaskDialog properties and their equivalent TJSDialog properties.

TASKDIALOG


TaskDialog TJSDialog


hwndParent Dialog owner passed in Execute overload
hInstance Not required
pszWindowTitle Title 
pszMainInstruction Instruction.Text
pszContent Content
dwCommonButtons ButtonBar.CommonBtns 
hMainIcon MainIcon 
 

TASKDIALOGINDIRECT
TaskDialogIndirect TJSDialog


hwndParent Dialog owner passed in Execute overload
hInstance Not required
pszWindowTitle Title 
pszMainInstruction Instruction.Text
pszContent Content
dwCommonButtons ButtonBar.CommonBtns 
hMainIcon MainIcon 
dwFlags DialogOptions
cButtons CustomButtons
pButtons CustomButtons
nDefaultButton ButtonBar.CommonBtns.Default
  CustomButtons[index].Default
cRadioButtons RadioButtons
pRadioButtons RadioButtons
nDefaultRadioButton RadioButtons[index].Checked
pszVerificationText Verification.Text
pszExpandedInformation Expando.Lines
pszExpandedControlText Expando.ExpandedText
pszCollapsedControlText Expando.CollapsedText
hFooterIcon Footer.Icon
pszFooterIcon Footer.Icon
pszFooter Footer.Text
pfCallback Published events
lpCallbackData Published events
cxWidth Width

As well as a TJSDialog component that can be dropped on a form or instantiated in code, there are also a number of predefined wrapper functions to make using the dialog more convenient to use.

Wrapper Functions

All wrapper functions are included in the JSDialogs unit.

MessageDlg function calls
 
JSDialogs redeclares many of the MessageDlg function calls. Simply add JSDialogs to the uses clause of your units that use Dialogs and your MessageDlg calls will instantly use TJSDialog to display the dialogs with the updated look.

Also includes ShowMessage and ShowMessageFmt methods.

Q) I don't want the new look for certain applications?
A) Simply set JSDialog.UseOldDialogStyle to True in your application initialization code

Other wrapper functions

TaskDialog : Dialog that takes for Title, MainInstruction, Content, Buttons and Icon. Use this function instead of MessageDlg for dialogs that require an instruction as well as content. You do not need to specify an instruction and content though, both are optional.
ShowInfoMessage : Displays a dialog with the information icon.
ShowErrorMessage : Displays a dialog with the error icon.
ShowWarningMessage : Displays a dialog with the warning icon. Has OK and Cancel buttons visible. Result will either be mrOK or mrCancel.
ShowConfirmMessage : Displays a dialog with the confirmation/question icon. Has Yes and No buttons visible. Function result will either be mrYes or mrNo.

VerifyMessage : Displays a task dialog with a verification checkbox. There are 3 overloads of VerifyMessage

Q) Can you add a wrapper function for xyz?
A) Send me the details and I'll add one.

Further Details

For further information on the included wrapper functions check out Demo5.