Mega Code Archive

 
Categories / Delphi / Forms
 

How to format a MessageDlg

Title: How to 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, OK wurde gedr¨¹ckt') else ShowMessage('Cancel pressed. Abbrechen wurde gedr¨¹ckt'); end;