-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFS_UN.PAS
86 lines (71 loc) · 1.98 KB
/
FS_UN.PAS
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
unit FS_UN;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls;
type
TFullSCR = class(TForm)
FullImg: TImage;
procedure FullImgClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FullSCR: TFullSCR;
procedure ShowFS;
implementation
{$R *.DFM}
uses dpemform,photo;
procedure ShowFS;
begin
with TFullSCR.Create(Application) do
try
ShowModal;
finally
Free;
end;
end;
procedure TFullSCR.FullImgClick(Sender: TObject);
begin
ModalResult := mrOK;
end;
procedure TFullSCR.FormShow(Sender: TObject);
begin
Width := Screen.Width;
Height := Screen.Height;
HorzScrollBar.Range := FullImg.Picture.Width;
VertScrollBar.Range := FullImg.Picture.Height;
end;
procedure TFullSCR.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case key of {INC and DEC do not work for}
{Position property}
37: HorzScrollBar.Position := HorzScrollBar.Position-1;
39: HorzScrollBar.Position := HorzScrollBar.Position+1;
38: VertScrollBar.Position := VertScrollBar.Position-1;
40: VertScrollBar.Position := VertScrollBar.Position+1;
33: VertScrollBar.Position := VertScrollBar.Position-20;
34: VertScrollBar.Position := VertScrollBar.Position+20;
35: HorzScrollBar.Position := HorzScrollBar.Position+20;
36: HorzScrollBar.Position := HorzScrollBar.Position-20;
end;
end;
procedure TFullSCR.FormKeyPress(Sender: TObject; var Key: Char);
begin
ModalResult := mrOK;
end;
procedure TFullSCR.FormCreate(Sender: TObject);
var tft : TFPhoto;
begin
tft := TFPhoto(DPEMain.ActiveMDIChild);
FullImg.Picture.Bitmap.Assign(tft.Photo.Picture.Bitmap);
end;
end.