'Classes/System/Windows/Forms/MessageBox.ab

'#require <Classes/System/Windows/Forms/misc.ab>
'#require <Classes/ActiveBasic/Windows/Windows.ab>

Namespace System
Namespace Windows
Namespace Forms

Enum MessageBoxButtons
	OK = MB_OK
	OKCancel = MB_OKCANCEL
	AbortRetryIgnore = MB_ABORTRETRYIGNORE
	YesNoCancel = MB_ABORTRETRYIGNORE
	YesNo = MB_YESNO
	RetryCancel = MB_RETRYCANCEL
End Enum

Enum MessageBoxIcon
	None = 0
	Hand = MB_ICONHAND
	Question = MB_ICONQUESTION
	Exclamation = MB_ICONEXCLAMATION
	Asterisk = MB_ICONASTERISK
	Warning = MB_ICONWARNING
	Error = MB_ICONERROR
	Information = MB_ICONINFORMATION
	Stop = MB_ICONSTOP
End Enum

Enum MessageBoxDefaultButton
	Button1 = MB_DEFBUTTON1
	Button2 = MB_DEFBUTTON2
	Button3 = MB_DEFBUTTON3
End Enum

Enum MessageBoxOptions
	None = 0
	DefaultDesktopOnl = MB_DEFAULT_DESKTOP_ONLY
	RightAlign = MB_RIGHT
	RtlReading = MB_RTLREADING
	ServiceNotification = MB_SERVICE_NOTIFICATION
End Enum

Class MessageBox
Public
	Static Function Show(text As String) As DialogResult
		Show = Show(Nothing, text, "", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(owner As IWin32Window, text As String) As DialogResult
		Show = Show(owner, text, "", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(text As String, caption As String) As DialogResult
		Show = Show(Nothing, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(owner As IWin32Window, text As String, caption As String) As DialogResult
		Show = Show(owner, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons) As DialogResult
		Show = Show(Nothing, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons) As DialogResult
		Show = Show(owner, text, caption, buttons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon) As DialogResult
		Show = Show(Nothing, text, caption, buttons, icon, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon) As DialogResult
		Show = Show(owner, text, caption, buttons, icon, MessageBoxDefaultButton.Button1, MessageBoxOptions.None)
	End Function

	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton) As DialogResult
		Show = Show(Nothing, text, caption, buttons, icon, defaultButtion, MessageBoxOptions.None)
	End Function

	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton) As DialogResult
		Show = Show(owner, text, caption, buttons, icon, defaultButtion, MessageBoxOptions.None)
	End Function

	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions) As DialogResult
		Show = Show(Nothing, text, caption, buttons, icon, defaultButtion, options)
	End Function

	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions) As DialogResult
		'Show = ActiveBasic.Windows.Detail._System_MessageBox(owner.Handle, StrPtr(text), StrPtr(caption), buttons As DWord Or icon As DWord Or defaultButtion As DWord Or options As DWord) As DialogResult
	End Function

'	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, displayHelpButton As Boolean) As DialogResult
'	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String) As DialogResult
'	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String) As DialogResult
'	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String, navigator As HelpNavigator) As DialogResult
'	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String, navigator As HelpNavigator) As DialogResult
'	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String, keyword As String) As DialogResult
'	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String, keyword As String) As DialogResult
'	Static Function Show(text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String, navigator As HelpNavigator, param As Object) As DialogResult
'	Static Function Show(owner As IWin32Window, text As String, caption As String, buttons As MessageBoxButtons, icon As MessageBoxIcon, defaultButtion As MessageBoxDefaultButton, options As MessageBoxOptions, helpFilePath As String, navigator As HelpNavigator, param As Object) As DialogResult
End Class

End Namespace 'Forms
End Namespace 'Widnows
End Namespace 'System
