procedure Res_change ResX ResY integer var dm TDEVMODE begin ZeroMemor

 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
procedure Res_change(ResX, ResY: integer);
var dm : TDEVMODE;
begin
ZeroMemory(@dm, sizeof(TDEVMODE));
dm.dmSize := sizeof(TDEVMODE);
dm.dmPelsWidth := ResX;
dm.dmPelsHeight := ResY;
dm.dmFields := DM_PELSWIDTH or DM_PELSHEIGHT;
ChangeDisplaySettings(dm, 0);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
halt;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
X:=Screen.Width;
Y:=Screen.Height;
IMage1.Hint:='Current: ' + DateToStr(Date) +' '+ TimeToStr(Time);
Res_Change(1024,768);
Application.OnIdle := AppIdle;
Form1.Hide;
FOrm1.Visible:=false;
end;
procedure TForm1.Image1Click(Sender: TObject);
begin
Showmessage('2525');
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Image2.Picture.Free;
end;
procedure TForm1.Desktopproperties1Click(Sender: TObject);
begin
sOpenDialog1.Execute;
Image2.Picture.LoadFromFile(sOpenDialog1.Filename);
end;