转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 软件开发 >> Delphi程序 >> 正文
制作从屏幕右下角逐渐弹出的消息提示框         ★★★★

制作从屏幕右下角逐渐弹出的消息提示框

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2663 更新时间:2009/4/23 18:28:21
tion = ''''Alt+↓:打开下拉列表框''''
    Transparent = True
  end
  object Label6: TLabel
    Left = 16
    Top = 61
    Width = 108
    Height = 12
    Caption =
''''Ctrl+Ins:插入一行''''
    Transparent = True
  end
  object Label7: TLabel
    Left = 16
    Top = 80
    Width = 120
    Height = 12
    Caption =
''''Ctrl+Del:删除当前行''''
    Transparent = True
  end
  object Label8: TLabel
    Left = 174
    Top = 42
    Width = 138
    Height = 12
    Caption =
''''Ins:打开“工艺名称表”''''
    Transparent = True
  end
  object Label9: TLabel
    Left = 174
    Top = 61
    Width = 90
    Height = 12
    Caption =
''''F11:插入“℃”''''
    Transparent = True
  end
  object Label10: TLabel
    Left = 174
    Top = 80
    Width = 90
    Height = 12
    Caption =
''''F12:插入“′”''''
    Transparent = True
  end
  object Label11: TLabel
    Left = 0
    Top = 165
    Width = 343
    Height = 3
    Cursor = crSizeNS
    Align = alBottom
    AutoSize = False
    Transparent = True
    OnMouseDown = Label11MouseDown
    OnMouseMove = Label11MouseMove
  end
  object Label12: TLabel
    Left = 0
    Top = 12
    Width = 3
    Height = 153
    Cursor = crSizeWE
    Align = alLeft
    AutoSize = False
    Transparent = True
    OnMouseDown = Label12MouseDown
  end
  object Label13: TLabel
    Left = 340
    Top = 12
    Width = 3
    Height = 153
    Cursor = crSizeWE
    Align = alRight
    AutoSize = False
    Transparent = True
    OnMouseDown = Label13MouseDown
  end
end

 代码formPSHotKey.pas内容 unit formPSHotKey;

interface

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

{========================================================================
  DESIGN BY :  彭国辉
  DATE:        2004-10-28
  SITE:       
http://kacarton.yeah.net/
  BLOG:        http://blog.csdn.net/nhconch
  EMAIL:       kacarton@sohu.com

  文章为作者原创,转载前请先与本人联系,转载请注明文章出处、保留作者信息,谢谢支持!
=========================================================================}

type
  TfrmPSHotKey = class(TForm)
    imgTitleBar: TImage;
    imgTitleBarBG: TImage;
    imgShapeBG: TImage;
    SpeedButton1: TSpeedButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    procedure FormPaint(Sender: TObject);
    procedure imgTitleBarMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FormCreate(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
    procedure Label11MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FormResize(Sender: TObject);
    procedure Label12MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure Label13MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure imgTitleBarMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    procedure Label11MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private declarations }
  public
   
 { Public declarations }
  end;

var
  frmPSHotKey: TfrmPSHotKey;

implementation

{$R *.dfm}

procedure TfrmPSHotKey.FormCreate(Sender: TObject);
begin
    Tag := Height;
    Height := 16; 
    //定位到屏幕右下角
    Top := Screen.Height - 40;
    Left := Screen.Width - Width - 2;
    Show; 
    //从屏幕右下角逐渐弹出
    while Height<Tag do begin
        Height := Height + 5;
        Top := Top - 5;
        Update;
        Application.ProcessMessages;
        Sleep(10);
    end;
    Height := Tag;
    Tag := 0;
    Color := $F4BA9D;
    FormResize(Sender);
end;

procedure TfrmPSHotKey.FormPaint(Sender: TObject);
var
    i: integer;
    rgn: HRGN;
    r: TRect;
begin
    with Canvas do begin 
        //利用imgTitleBarBG绘制标题背景
        for i:=0 to ClientWidth div imgTitleBarBG.Width do
            Draw(i*imgTitleBarBG.Width, 0, imgTitleBarBG.Picture.Bitmap);
        if Tag<>0 then Exit;  //如果窗体正在弹出状态,不绘制内容面板背景
        //绘制内容面板背景

上一页  [1] [2] [3]  下一页


没有相关教程
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · C语言系列  · VB.NET程序
    · JAVA开发  · Delphi程序
    · 脚本语言
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台