Ver Mensaje Individual
  #3  
Antiguo 26-09-2005
fidel fidel is offline
Miembro
 
Registrado: mar 2005
Posts: 381
Reputación: 22
fidel Va por buen camino
Hola:

Si que es posible, alguien de este foro hace algún tiempo me pasó esto y funciona.

Código Delphi [-]
//en la zona private pones esto

  private
    { Private declarations }
    //para situar mensajes con messagebox
    MsgTitle: String; // Título del mensaje
    MsgX, MsgY: Integer;  // Posición del mensaje
    procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE;
  public
    { Public declarations }
  end;


//añades este procedimiento

//para situar mensajes con messagebox
//TFGupos el el nombre del form, debes poner el tuyo
procedure TFGrupos.WMActivate(var Message: TWMActivate);
var
  Buffer: array[Byte] of Char;
begin
  inherited;
  if Message.Active = WA_INACTIVE then
  begin
    GetWindowText(Message.ActiveWindow, Buffer, SizeOf(Buffer));
    if (Buffer <> '') and (Buffer = MsgTitle) then
      SetWindowPos(Message.ActiveWindow,0,MsgX,MsgY,0,0,SWP_NOSIZE or SWP_NOZORDER);
  end;
end;


//y pones el mensaje

  //mensaje en la posición 450, 435 con título "Grupos"
  MsgTitle := 'Grupos';
  MsgX := 450;
  MsgY := 435;
  if Application.MessageBox('¿Borrar este grupo?',PChar(MsgTitle),mb_OkCancel+mb_IconQuestion)= IdOk then
    begin
      //....
    end;

Un saludo.
Responder Con Cita