Ver Mensaje Individual
  #10  
Antiguo 02-05-2013
wolfran_hack wolfran_hack is offline
Miembro
 
Registrado: abr 2013
Posts: 97
Reputación: 12
wolfran_hack Va por buen camino
MessageBoxTimeOut

Encontré este otro:

Código Delphi [-]
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    //Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
  public
  end;

var
  Form1: TForm1;

const
  MB_TIMEDOUT = 32000;

implementation  {$R *.dfm}

function MessageBoxTimeOut(hWnd: HWND; lpText: PChar; lpCaption: PChar; uType: UINT; wLanguageId: WORD; dwMilliseconds: DWORD): Integer; stdcall; external user32 name 'MessageBoxTimeoutA';

procedure TForm1.Button1Click(Sender: TObject);
var
  iRet: Integer;
  iFlags: Integer;
begin
   iFlags := MB_OK or MB_SETFOREGROUND or MB_SYSTEMMODAL or MB_ICONINFORMATION;
   MessageBoxTimeout(Application.Handle, 'El Mensaje se Mostrar por X tiempo..', 'Titulo del Mensaje', iFlags, 0, 2000) ; //2000 son 2 segundos.
end;

end.

y funciona, pero me lanza:

Responder Con Cita