Ver Mensaje Individual
  #9  
Antiguo 11-06-2015
Avatar de nlsgarcia
[nlsgarcia] nlsgarcia is offline
Miembro Premium
 
Registrado: feb 2007
Ubicación: Caracas, Venezuela
Posts: 2.206
Reputación: 21
nlsgarcia Tiene un aura espectacularnlsgarcia Tiene un aura espectacular
Club Delphi,

Cita:
Empezado por H.Sagas96
...There is no overloaded version of MessageDlg that can be called with these arguments...
Cita:
Empezado por H.Sagas96
...Ya logre corregir el error...


Revisa este código:
Código Delphi [-]
unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
   if MessageDlg('¿Quiere borrar el pedido?', mtWarning, [mbYes,mbNo], 0) = mrYes then
      MessageDlg('Pedido Borrado', mtInformation, [mbOk], 0)
   else
      MessageDlg('Se mantiene el Pedido', mtInformation, [mbOk], 0)
end;

end.
El código anterior en Delphi XE6 sobre Windows 7 Professional x32, Muestra en ambiente VCL el uso de la función MessageDlg.

Revisa esta código:
Código Delphi [-]
unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 
  FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Button1Click(Sender: TObject);
begin
   if (MessageDlg('¿Quiere borrar el pedido?', TMsgDlgType.mtWarning, [TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo], 0) =  mrYes) then
      MessageDlg('Pedido Borrado', TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOk], 0)
   else
      MessageDlg('Se mantiene el Pedido', TMsgDlgType.mtInformation, [TMsgDlgBtn.mbOk], 0)
end;

end.
El código anterior en Delphi XE6 sobre Windows 7 Professional x32, Muestra en ambiente FMX el uso de la función MessageDlg.

Revisa esta información:
Notas:

1- Toda la información anterior es para futuras consultas relacionadas a la función MessageDlg en ambiente VCL y FMX.

2- El código sugerido en VCL y FMX, funciono correctamente en Delphi XE6 y Delphi XE7.

3- El error mencionado en el Msg #1 (E2250 There is no overloaded version of 'MessageDlg' that can be called with these arguments), ocurre si se utiliza la sintaxis VCL de la función MessageDlg en FMX.

Espero sea útil

Nelson.

Última edición por nlsgarcia fecha: 12-06-2015 a las 19:57:08.
Responder Con Cita