Format a MessageDlg

Format a MessageDlg

procedure TForm1.Button1Click(Sender: TObject);
var
  f: TForm;
begin
  // Create the MessageDialog
  f := Dialogs.CreateMessageDialog('HELLOWORLD', dialogs.mtInformation, dialogs.mbOKCancel);

  // Set the backcolor to blue.
  f.Color := clBlue;

  // Set textcolor to lime
  f.Font.Color := clLime;

  // Shows the dialog and wait for the modalresult
  if f.ShowModal = mrOk then
    ShowMessage('OK Pressed')
  else
    ShowMessage('Cancel pressed');
end;