Native Task Dialogs Functions: Example of TaskDialog & TaskDialogIndirect

I’ve always missed the proper Task Dialog Functions for Windows Applications in Xojo.
If your application has to ask the user for a choice of actions/tasks, this is what a native (Task)Dialog should look like:

The required Declares are a bit tricky - but here you are: This example project shows how you can do this without any Plugins required. The Declares are ready for both 32Bit and 64Bit Builds.

Some convenience Methods are provided for the most often used Task Dialogs. The Advanced Dialog lets you explore all the settings.
It falls back to MessageBox/MessageDialog, if the OS you’re building for doesn’t support TaskDialogs.
Also provided are convenience methods for often used MessageBoxes, which use the Task Dialog API if available, and otherwise fallback to Xojo’s standard MsgBox.

This is also available via MBS Plugin: TaskDialogMBS class.

Of course - who hasn’t thought so? :slight_smile:

But is yours as simple to call as this (and works for macOS and Linux appropriately, too)?

select case TaskDialog_TwoOptions("Title", MsgBoxIcon.Caution, "Main Instruction", "Information", "Task 1", "Task 2", bAllowCancel, oShowInWindow) case 1 'first/default Task case 2 'second Task else 'cancel end select