Das liegt wohl daran, dass einige dieser Konstanten bereits Sets sind und einige nicht.
Das könnte man z.B. so lösen:
Code:
var
DlgType: TMsgDlgType;
DlgBtn: set of TMsgDlgBtn;
begin
// if Fehler = Error Then DlgType := mtError
// else if Information = 'Info' Then DlgType := mtInformation
// else if Warnung = 'Warn' Then DlgType := mtWarning
// else if Frage = 'Confirmation' Then DlgType := mtConfirmation
// else if Ohne = 'Custom' Then DlgType := mtCustom;
if RadioButton1.Checked = True Then DlgBtn := [mbOK]
else if RadioButton2.Checked = True Then DlgBtn := mbAbortRetryIgnore
else if RadioButton3.Checked = True Then DlgBtn := mbOkCancel
else if RadioButton4.Checked = True Then DlgBtn := [mbRetry]
else if RadioButton5.Checked = True Then DlgBtn := mbYesNo
else if RadioButton6.Checked = True Then DlgBtn := mbYesNoCancel;
MessageDlg(edit1.text, DlgType, DlgBtn, 0);
end;