In Delphi; what are the differences between Application.MessageBox, Windows.MessageBox or Dialogs.MessageDlg? Or which is more efficient to use computer memory?
In Delphi ; what are the differences between Application.MessageBox, Windows.MessageBox or Dialogs.MessageDlg? Or which
Share
Windows.MessageBox is the WinAPI MessageBox, Application.MessageBox is a wrapper around it. Dialogs.MessageDlg however is a VCL form. So if you are concerned about memory or thread safety, the first two might be better suited. MessageDlg OTOH is more flexible and easier to use (IMHO, of course).
Nowadays, I’d consider task dialogs (TaskDialogIndirect, TTaskDialog or another wrapper).