亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? msgfrm.pas

?? 類似于MSN登陸消息提示窗口!比較不錯
?? PAS
字號:
unit MsgFrm;

interface

uses
  Windows, Messages, SysUtils, Classes,  Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, MsgUnit, jpeg, se_controls, KsSkinPanels,
  KsSkinEngine;

type
{ TMsgForm }

  TMsgForm = class(TForm)
    Panel1: TPanel;
    L_Msg: TLabel;
    imgWarning: TImage;
    imgInfo: TImage;
    imgError: TImage;
    L_Caption: TLabel;
    L_AppName: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure tmFadeInTimer(Sender: TObject);
    procedure tmDelayTimer(Sender: TObject);
    procedure tmFadeOutTimer(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormClick(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure L_MsgMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    procedure L_MsgMouseLeave(Sender: TObject);
    procedure SeSkinPanel1Resize(Sender: TObject);
    procedure SeSkinPanel1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
  private
    { Private declarations }
    FMsg: string;
    Bmp: TBitmap;
    FMsgKind: TMsgKind;
    StartColor, EndColor: TColor;
    FMsgPos: TShowPos;
    InTimer: Integer;
    InValue: Integer;
    InDraw: Boolean;
    tmFadeIn: TTimer;
    tmFadeOut: TTimer;
    tmDelay: TTimer;
    FormClicked: Boolean;
    
    procedure SetMsg(const Value: string);
    procedure SetMsgKind(const Value: TMsgKind);
    procedure SetMsgPos(const Value: TShowPos);
    procedure CreateTimers;
  protected
    function CalcRect(MaxWidth: Integer; const ACap: string; AData: Pointer): TRect;

  public
    lAutoClose: Boolean;
    property Msg: string read FMsg write SetMsg;
    property MsgKind: TMsgKind read FMsgKind write SetMsgKind;
    property MsgPos: TShowPos read FMsgPos write SetMsgPos;
  end;

  procedure ShowMsg(const Info: string; Kind: TMsgKind; lCaptionFont, lInfoFont: TFont;Lclick:TNotifyEvent); overload;
  procedure ShowInfo(const Info: string);
  procedure ShowWarning(const Info: string);
  procedure ShowError(const Info: string);

var
  MsgForm : TMsgForm;

  AppCaption: String;
  {* 窗口標題}
  ShowCaption: String ;
  {* 消息標題}
  ShowPos: TShowPos;
  {* 默認顯示位置}
  ShowMsgStyle: TMsgStyle;
  {* 窗口風格}
  ShowDelay: Integer;
  {* 延時 }
  AutoClose: Boolean ;
  {* 是否自動關閉}
  CaptionFont, InfoFont: TFont ;
  {* 標題,內容字體}

implementation

{$R *.DFM}

var
  ThisList: TThreadList;

function GetWorkRect: TRect;
begin
  SystemParametersInfo(SPI_GETWORKAREA, 0, @Result, 0)
end;

procedure ShowMsg(const Info: string; Kind: TMsgKind; lCaptionFont, lInfoFont: TFont;Lclick:TNotifyEvent) ;
var
  H: Integer;
begin
  CaptionFont := TFont.Create ;
  InfoFont := TFont.Create ;
  CaptionFont.Assign(lCaptionFont) ;
  InfoFont.Assign(lInfoFont) ;
  MsgForm := TMsgForm.Create(nil) ;
  with MsgForm do begin
    Msg := Info;
    MsgKind := Kind;
    MsgPos := ShowPos;
    lAutoClose := AutoClose;
    if ShowMsgStyle = msXpBlue then begin
     //  M_Image2.SendToBack ;
       L_AppName.Top := 7;
       L_AppName.Font.Color := clWhite;
    end;
    if ShowMsgStyle = msContracted then begin
      // M_Image1.SendToBack ;
       L_AppName.Top := 3;
       L_AppName.Font.Color := clBlack;
    end;
    H := CalcRect(L_Msg.Width, Info, nil).Bottom - L_Msg.Height;
    if H > 0 then
    begin
      L_Msg.Height := L_Msg.Height + H;
      Height := Height + H;
    end;
    L_Caption.Caption:=ShowCaption;
    L_MSG.OnClick:=Lclick;
    ShowWindow(Handle, SW_SHOWNOACTIVATE);
    SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOACTIVATE or SWP_NOSIZE or SWP_NOOWNERZORDER);
    SetCurrentRoundWindow(Handle, Width + 1, Height + 1);
    FormShow(nil);
  end;
end;

procedure ShowInfo(const Info: string);
begin
 // ShowMsg(Info, mkInfo, CaptionFont, InfoFont,MsgForm.myclick);
end;

procedure ShowWarning(const Info: string);
begin
 // ShowMsg(Info, mkWarning, CaptionFont, InfoFont,MsgForm.myclick);
end;

procedure ShowError(const Info: string);
begin
//  ShowMsg(Info, mkError, CaptionFont, InfoFont,myclick);
end;

{ TMsgForm }

procedure TMsgForm.FormCreate(Sender: TObject);
begin
  L_Msg.Font.Assign(InfoFont) ;
  L_Caption.Font.Assign(CaptionFont);
  Left := -300;
  Top := Screen.Height + 300;
 // L_AppName.Caption := Application.Title ;
  with ThisList.LockList do
  try
    Add(Self);
  finally
    ThisList.UnlockList;
  end;
  Bmp := TBitmap.Create;
  Bmp.PixelFormat := pf24Bit;
  CreateTimers;
  tmFadeIn.Enabled := True;
  FormClicked := False;
 // myclick:=l_msg.OnClick ;
end;

procedure TMsgForm.FormShow(Sender: TObject);
begin
  case MsgPos of
    spLeft:
      begin
        Top := (GetWorkRect.Bottom - Height) div 2;
        Left := GetWorkRect.Left + 1 - Width;
      end;
    spRight:
      begin
        Top := (GetWorkRect.Bottom - Height) div 2;
        Left := GetWorkRect.Right - 1;
      end;
    spRightTop:
      begin
        Top := GetWorkRect.Top + 1 - Height;
        Left := GetWorkRect.Right - Width;
      end;
  else
    begin
      Top := GetWorkRect.Bottom - 1;
      Left := GetWorkRect.Right - Width;
    end;
  end;
  tmDelay.Interval := ShowDelay * 1000;
end;

procedure TMsgForm.FormDestroy(Sender: TObject);
begin
  Bmp.Free;
  CaptionFont.Free ;
  InfoFont.Free ;
  with ThisList.LockList do
  try
    Delete(IndexOf(Self));
  finally
    ThisList.UnlockList;
  end;
end;

procedure TMsgForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  tmFadeIn.Enabled := False;
  tmDelay.Enabled := False;
  tmFadeOut.Enabled := False;
end;

procedure TMsgForm.FormClick(Sender: TObject);
begin
  FormClicked := True ;
  tmDelayTimer(Self);
end;

procedure TMsgForm.tmFadeInTimer(Sender: TObject);
begin
  Inc(InTimer);
  InValue := 1 + InTimer * 3 div 11;
  case MsgPos of
    spLeft:
      begin
        if Left >= GetWorkRect.Left then
        begin
          tmFadeIn.Enabled := False;
          tmDelay.Enabled := True;
        end
        else if Left - InValue >= GetWorkRect.Left then
          Left := GetWorkRect.Left
        else
          Left := Left + InValue;
      end;
    spRight:
      begin
        if Left <= GetWorkRect.Right - Width then
        begin
          tmFadeIn.Enabled := False;
          tmDelay.Enabled := True;
        end
        else if Left + InValue <= GetWorkRect.Right - Width then
          Left := GetWorkRect.Right - Width
        else
          Left := Left - InValue;
      end;
    spRightTop:
      begin
        if Top >= GetWorkRect.Top then
        begin
          tmFadeIn.Enabled := False;
          tmDelay.Enabled := True;
        end
        else if Top - InValue >= GetWorkRect.Top then
          Top := GetWorkRect.Top
        else
          Top := Top + InValue;
      end;
  else
    begin
      if Top + Height <= GetWorkRect.Bottom then
      begin
        tmFadeIn.Enabled := False;
        tmDelay.Enabled := True;
      end
      else if Top + Height + InValue <= GetWorkRect.Bottom then
        Top := GetWorkRect.Bottom - Height
      else
        Top := Top - InValue;
    end;
  end;
end;

procedure TMsgForm.tmDelayTimer(Sender: TObject);
begin
  tmFadeIn.Enabled := False;
  tmDelay.Enabled := False;
  if FormClicked then
     tmFadeOut.Enabled := True
  else begin
     if lAutoClose then
        tmFadeOut.Enabled := True
     else
        tmFadeOut.Enabled := False;
  end;
end;

procedure TMsgForm.tmFadeOutTimer(Sender: TObject);
begin
  if InTimer > 0 then
    Dec(InTimer);
  InValue := 1 + InTimer * 3 div 11;
  case MsgPos of
    spLeft:
      begin
        Left := Left - InValue;
        if Left <= GetWorkRect.Left + 2 - Width then
        begin
          tmFadeOut.Enabled := False;
          Self.Close;
        end;
      end;
    spRight:
      begin
        Left := Left + InValue;
        if Left >= GetWorkRect.Right - 2 then
        begin
          tmFadeOut.Enabled := False;
          Self.Close;
        end;
      end;
    spRightTop:
      begin
        Top := Top - InValue;
        if Top <= GetWorkRect.Top + 1 - Height then
        begin
          tmFadeOut.Enabled := False;
          Self.Close;
        end;
      end;
  else
    begin
      Top := Top + InValue;
      if Top >= GetWorkRect.Bottom - 2 then
      begin
        tmFadeOut.Enabled := False;
        Self.Close;
      end;
    end;
  end;
end;

procedure TMsgForm.SetMsg(const Value: string);
begin
  FMsg := Value;
  L_Msg.Caption := FMsg;
end;

procedure TMsgForm.SetMsgKind(const Value: TMsgKind);
begin
  FMsgKind := Value;
  case FMsgKind of
    mkError:
      begin
        imgError.Visible := True;
        imgWarning.Visible := False ;
        imgInfo.Visible := False ;
        L_Caption.Caption := ShowCaption;
      end;
    mkWarning:
      begin
        imgError.Visible := False;
        imgWarning.Visible := True;
        imgInfo.Visible := False ;
        L_Caption.Caption := ShowCaption;
      end;
  else
    begin
      imgError.Visible := False;
      imgWarning.Visible := False;
      imgInfo.Visible := True;
      L_Caption.Caption := ShowCaption;
    end;
  end;
end;

procedure TMsgForm.SetMsgPos(const Value: TShowPos);
begin
  FMsgPos := Value;
end;

procedure TMsgForm.CreateTimers;
begin
  tmFadeIn := TTimer.Create(Self);
  with tmFadeIn do
  begin
    Enabled := False;
    Interval := 15;
    OnTimer := tmFadeInTimer;
  end;
  tmFadeOut := TTimer.Create(Self);
  with tmFadeOut do
  begin
    Enabled := False;
    Interval := 15;
    OnTimer := tmFadeOutTimer;
  end;
  tmDelay := TTimer.Create(Self);
  with tmDelay do
  begin
    Enabled := False;
    Interval := 5000;
    OnTimer := tmDelayTimer;
  end;
end;

function TMsgForm.CalcRect(MaxWidth: Integer; const ACap: string;
  AData: Pointer): TRect;
begin
  Result := Rect(0, 0, MaxWidth, 0);
//  DrawText(L_Msg.Canvas.Handle, PChar(ACap),Result, -1);
end;

procedure TMsgForm.L_MsgMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
 if pos('http',l_MSG.Caption)<>0 then
    L_MSG.Font.Color:=Clred;
end;

procedure TMsgForm.L_MsgMouseLeave(Sender: TObject);
begin
 if pos('http',l_MSG.Caption)<>0 then
    L_MSG.Font.Color:=Clblack;
end;

procedure TMsgForm.SeSkinPanel1Resize(Sender: TObject);
begin
Panel1.Refresh;
end;

procedure TMsgForm.SeSkinPanel1MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(MsgForm.handle,wm_SysCommand,$f012,0);
end;

initialization
  ThisList := TThreadList.Create;

finalization
  FreeAndNil(ThisList);

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91女厕偷拍女厕偷拍高清| 91麻豆精品国产综合久久久久久| 91成人在线免费观看| 欧美大白屁股肥臀xxxxxx| 国产精品国产馆在线真实露脸| 香蕉久久一区二区不卡无毒影院| 成人三级伦理片| 欧美成人高清电影在线| 亚洲国产精品久久一线不卡| 成人av在线看| 国产亚洲1区2区3区| 日韩成人精品在线| 一本大道综合伊人精品热热| 国产精品麻豆视频| 国产一区二区三区| 精品三级在线观看| 香港成人在线视频| 欧美在线制服丝袜| 亚洲精品日韩专区silk| 91在线视频观看| 国产精品视频免费看| 国产成人精品免费网站| 久久色成人在线| 精品写真视频在线观看 | 精品国产人成亚洲区| 亚洲一区av在线| 91麻豆swag| 亚洲女子a中天字幕| 99精品国产99久久久久久白柏| 国产免费久久精品| 国产成a人亚洲精| 国产欧美日韩在线看| 东方欧美亚洲色图在线| 久久精品人人做人人综合| 精品一区二区免费视频| 日韩视频一区二区在线观看| 日本午夜精品视频在线观看| 欧美一级欧美三级| 国产在线不卡一区| 国产亚洲自拍一区| 不卡影院免费观看| 成人欧美一区二区三区1314| 国产精品污网站| 一区二区激情小说| 在线观看精品一区| 午夜亚洲国产au精品一区二区| 欧美放荡的少妇| 久久se这里有精品| 国产亚洲精品精华液| 成年人网站91| 一区二区三区欧美日| 欧美日韩国产一区二区三区地区| 免费在线观看视频一区| 久久久久久99久久久精品网站| 国产.欧美.日韩| 亚洲综合一区二区三区| 日韩一区二区三区视频在线 | 亚洲欧美日韩精品久久久久| 欧美影院一区二区三区| 日本sm残虐另类| 日本一区二区三级电影在线观看| proumb性欧美在线观看| 视频一区二区欧美| 久久久高清一区二区三区| 91一区一区三区| 日韩专区一卡二卡| 国产欧美日韩在线看| 精品视频1区2区3区| 国产呦精品一区二区三区网站| ㊣最新国产の精品bt伙计久久| 欧美日韩国产欧美日美国产精品| 国产乱码精品一区二区三区av | 欧美日本一道本在线视频| 精品在线播放免费| 亚洲黄色小说网站| 337p日本欧洲亚洲大胆精品| 色老汉一区二区三区| 久久精品国产一区二区三区免费看| 国产精品的网站| 26uuu亚洲综合色欧美| 欧美日韩一区二区三区在线 | 日韩福利电影在线| 亚洲欧洲色图综合| 日韩精品一区二区三区四区视频| 91在线观看高清| 国产专区欧美精品| 亚洲二区在线视频| 中文字幕日本不卡| 久久久亚洲国产美女国产盗摄 | 欧洲在线/亚洲| 粉嫩在线一区二区三区视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲人成人一区二区在线观看| 精品少妇一区二区三区免费观看 | a4yy欧美一区二区三区| 日本美女一区二区三区视频| 成人午夜免费电影| 欧美精彩视频一区二区三区| 日韩一区二区在线观看视频播放| 色屁屁一区二区| 成人亚洲一区二区一| 精品综合免费视频观看| 日本sm残虐另类| 亚洲无人区一区| 一区二区三区在线观看欧美| 亚洲人成网站精品片在线观看| 欧美极品另类videosde| 久久久精品2019中文字幕之3| 精品国产乱码久久| 精品免费一区二区三区| 日韩欧美成人一区二区| 日韩三级精品电影久久久| 日韩一区二区三区在线| 日韩欧美一二三| 精品欧美一区二区久久| 337p日本欧洲亚洲大胆色噜噜| 欧美一卡二卡在线| 日韩精品在线看片z| 日韩免费一区二区| 26uuu精品一区二区三区四区在线| 精品国产乱子伦一区| 337p粉嫩大胆色噜噜噜噜亚洲| 久久久综合精品| 亚洲国产高清在线| 中文字幕一区二| 亚洲免费在线播放| 亚洲国产精品久久久久婷婷884| 亚洲精品久久嫩草网站秘色| 亚洲国产美国国产综合一区二区| 性欧美大战久久久久久久久| 日本欧美韩国一区三区| 韩国理伦片一区二区三区在线播放| 国产一区二区三区黄视频| 成人免费电影视频| 色美美综合视频| 欧美日本免费一区二区三区| 欧美成人伊人久久综合网| 国产网红主播福利一区二区| 国产精品美女久久久久久久| 亚洲综合色婷婷| 蜜臀91精品一区二区三区| 国产福利一区二区三区视频在线 | 一区二区在线观看视频| 三级成人在线视频| 狠狠色狠狠色综合日日91app| 成人h版在线观看| 欧美日韩国产三级| 国产天堂亚洲国产碰碰| 亚洲精品免费视频| 久久国产精品色婷婷| 99久久精品国产精品久久| 欧美精品自拍偷拍动漫精品| 日本一区二区免费在线观看视频| 亚洲精品高清在线观看| 国产在线视视频有精品| 91久久精品网| 久久久久久免费网| 亚洲国产aⅴ成人精品无吗| 国产成人精品aa毛片| 欧美日韩亚洲丝袜制服| 国产女主播一区| 亚洲va国产天堂va久久en| 国产成人丝袜美腿| 制服丝袜亚洲网站| 综合久久给合久久狠狠狠97色| 免费人成精品欧美精品| 一本久久精品一区二区| 久久综合九色综合欧美98| 亚洲妇熟xx妇色黄| 成人在线一区二区三区| 欧美人体做爰大胆视频| 国产欧美一区二区精品性| 美女性感视频久久| 色综合久久久久综合99| 欧美激情在线一区二区| 精品综合久久久久久8888| 欧美伦理电影网| 亚洲激情一二三区| 成人精品国产一区二区4080| 精品国产91洋老外米糕| 视频一区在线播放| 欧美日韩精品是欧美日韩精品| 中文字幕亚洲视频| 丁香网亚洲国际| 久久久99久久| 国产一区中文字幕| 精品国产乱码久久久久久久久 | 日韩午夜在线影院| 婷婷中文字幕一区三区| 91成人在线精品| 亚洲激情自拍偷拍| 92国产精品观看| 国产精品美女久久久久久久| 成人黄页在线观看| 欧美高清在线视频| 丁香激情综合国产| 国产精品久久久一本精品| 国产成人久久精品77777最新版本| 久久伊人蜜桃av一区二区| 精品一二三四在线|