要保证每次在不同机器上都是从屏幕右上角开始展开?!

解决方案 »

  1.   

    你用个Timer不就可以实现了吗?
      

  2.   

    我收集过一个人家写的控件,可以参考一下:
    unit EaPopup;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,PoPoMsg;type
      TEaPopup = class(TComponent)
      private
        { Private declarations }
        FPopMsg: TPoPMsg;
        FTitle: string;
        FMessages: string;
        FStayTime: Integer;
        procedure SetStayTime(const Value: Integer);
      protected
        { Protected declarations }
      public
        { Public declarations }
        constructor Create(AOwner: TComponent);override;
        procedure PopUp;overload;
        procedure PopUp(const msgTitle, msg: string; msgStayTime:Integer);overload;
      published
        { Published declarations }
        property  Title: string read FTitle write FTitle;
        property  Messages: string read FMessages write FMessages;
        property  StayTime: Integer read FStayTime write SetStayTime;
      end;procedure Register;implementationprocedure Register;
    begin
      RegisterComponents('EaPack', [TEaPopup]);
    end;{ TEaPopup }
    procedure TEaPopup.PopUp;
    begin
      PopUp(FTitle,Messages,FStayTime);
    end;constructor TEaPopup.Create(AOwner: TComponent);
    begin
      inherited;
      FTitle := '消息';
      FMessages := 'Easoft Popup';
      FStayTime := 5;
    end;procedure TEaPopup.PopUp(const msgTitle, msg: string; msgStayTime:Integer);
    begin
      if Assigned(FPoPMsg) then
        FreeAndNil(FPopMsg);
      FPopMsg := TPoPMsg.Create(Self);
      
      with FPopMsg do
      begin
        Title.Caption := msgTitle;
        MessageText.Caption := msg;
        StayTime := msgStayTime;
        if StayTime < 1 then
          StayTime := 5;
        ScrollShow;
      end;
    end;
    procedure TEaPopup.SetStayTime(const Value: Integer);
    begin
      FStayTime := Value;
      if FStayTime <1 then
        FStayTime := 5;
    end;
    end.