On Tue, 29 Aug 2006 18:11:48 -0300
Cesar Romero <[EMAIL PROTECTED]> wrote:

> 
> > AFAIK the default and escape button is compatible to Delphi.
> >
> > Can someone check a
> > MessageDlg('','',mtInformation,[mbYes,mbNo,mbAbort],0) under Delphi.
> >   
> 
> Delphi 7:
> 
> //your code
>   MessageDlg('','',mtInformation,[mbYes,mbNo,mbAbort],0)
> [Error] MainForm.pas(182): Incompatible types: 'TMsgDlgType' and
> 'String' [Error] MainForm.pas(182): Incompatible types:
> 'TMsgDlgButtons' and 'TMsgDlgType'
> [Error] MainForm.pas(182): Incompatible types: 'Integer' and 'Set'

:)

 
> //fixed code
>   case MessageDlg('', mtInformation, [mbYes, mbNo, mbAbort], 0) of
>    mrYes: ShowMessage('Yes');
>    mrNo: ShowMessage('No');
>    mrAbort: ShowMessage('Abort');
>   end;
> 
> *ModalResult = mrNo when pressing ESC

Thanks. Fixed.

Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to