1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
procedure TMainform.FormCreate(Sender: TObject);
var
DesktopHWnd: HWnd;
DesktopDC: HDc;
n1 : Extended;
n2 : extended;
begin
//Scale := ();
Application.Minimize;
Sleep(3000);//en ms
DesktopHWnd := GetDesktopWindow;
DesktopDC := GetDC(DesktopHWnd);
image1.picture.Bitmap.Width:=Screen.Width ;
image1.picture.Bitmap.Height:=Screen.Height;
//BitBlt(image1.picture.Bitmap.Canvas.Handle,0,0,Screen.Width,Screen.Height,
//GetDC(GetDesktopWindow),0,0,SrcCopy);
BitBlt(image1.picture.Bitmap.Canvas.Handle,0,0,Screen.Width,Screen.Height, GetDC(GetDesktopWindow),0,0,SrcCopy);
//Self.scaleBy(125,100);
ReleaseDC(DesktopHWnd, GetDesktopWindow); //ReleaseDC(DesktopHWnd, DesktopDC);
Application.Restore;
Mainform.windowstate := Wsmaximized;
end; |
Partager