-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnt_UpDown.pas
More file actions
100 lines (85 loc) · 2.38 KB
/
Copy pathUnt_UpDown.pas
File metadata and controls
100 lines (85 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
unit Unt_UpDown;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters,
dxSkinsCore, dxSkinOffice2010Blue, dxSkinscxPCPainter, cxPC, ExtCtrls, ImgList,
dxGDIPlusClasses, Unt_Util;
type
TF_UpDown = class(TForm)
il_base: TImageList;
pgcntrl_base: TcxPageControl;
tab_base: TcxTabSheet;
img_base: TImage;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure img_baseClick(Sender: TObject);
procedure img_baseMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure img_baseMouseLeave(Sender: TObject);
private
FOutHandle: THandle;
FClick: Boolean;
procedure SetOutHandle(const Value: THandle);
procedure SetClick(const Value: Boolean);
{ Private declarations }
public
{ Public declarations }
published
property OutHandle: THandle read FOutHandle write SetOutHandle;
property Click: Boolean read FClick write SetClick default False;
end;
var
F_UpDown: TF_UpDown;
implementation
{$R *.dfm}
procedure TF_UpDown.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:= caFree;
Self:= nil;
end;
procedure TF_UpDown.FormCreate(Sender: TObject);
begin
FClick:= False;
end;
procedure TF_UpDown.FormShow(Sender: TObject);
begin
il_base.GetIcon(1, img_base.Picture.Icon);
ShowWindow(Application.Handle, SW_HIDE);
img_base.Hint:= 'Esconder ferramentas';
end;
procedure TF_UpDown.img_baseClick(Sender: TObject);
begin
Click:= not Click;
if Click then
begin
SendMessage(OutHandle, WM_UP, 0, 0);
il_base.GetIcon(0, img_base.Picture.Icon);
img_base.Hint:= 'Mostrar ferramentas';
end
else
begin
SendMessage(OutHandle, WM_NOTUP, 0, 0);
il_base.GetIcon(1, img_base.Picture.Icon);
img_base.Hint:= 'Esconder ferramentas';
end;
end;
procedure TF_UpDown.img_baseMouseLeave(Sender: TObject);
begin
//Self.AlphaBlendValue:= 150;
end;
procedure TF_UpDown.img_baseMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
//Self.AlphaBlendValue:= 255;
end;
procedure TF_UpDown.SetClick(const Value: Boolean);
begin
FClick := Value;
end;
procedure TF_UpDown.SetOutHandle(const Value: THandle);
begin
FOutHandle := Value;
end;
end.