Author: Jonas Bilinkevicius How to change the caption of a MessageDlg Answer: Build your own: 1 2 function MyMessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: 3 TMsgDlgButtons; 4 const ACaption: string = 'Hi'; DefaultButtonIndex: Integer = -1; HelpCtx: Longint 5 = 6 0): Integer; 7 var 8 Index: Integer; 9 ButtonIndex: Integer; 10 begin 11 with CreateMessageDialog(Msg, DlgType, Buttons) do 12 try 13 HelpContext := HelpCtx; 14 if ACaption <> '' then 15 Caption := ACaption; 16 if DefaultButtonIndex >= 0 then 17 begin 18 ButtonIndex := -1; 19 for Index := 0 to ControlCount - 1 do 20 begin 21 if Controls[Index] is TButton then 22 begin 23 Inc(ButtonIndex); 24 TButton(Controls[Index]).default := ButtonIndex = DefaultButtonIndex; 25 if ButtonIndex = DefaultButtonIndex then 26 ActiveControl := TButton(Controls[Index]); 27 end; 28 end; 29 end; 30 Result := ShowModal; 31 finally 32 free; 33 end; 34 end;