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] 下一页 |