Changeset 6 for trunk/Back.pas
- Timestamp:
- Jan 7, 2017, 11:32:14 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Back.pas
r2 r6 1 1 {$INCLUDE switches} 2 3 2 unit Back; 4 3 … … 24 23 25 24 uses 26 Directories,ScreenTools,Start;25 Directories, ScreenTools, Start; 27 26 28 27 {$R *.DFM} … … 30 29 procedure TBackground.FormCreate(Sender: TObject); 31 30 begin 32 img:=nil;31 img := nil; 33 32 end; 34 33 35 34 procedure TBackground.FormShow(Sender: TObject); 36 35 begin 37 img:=nil;38 if FullScreen then36 img := nil; 37 if FullScreen then 39 38 begin 40 if FileExists(HomeDir+'Graphics\Background.bmp')41 or FileExists(HomeDir+'Graphics\Background.png') then39 if FileExists(HomeDir + 'Graphics\Background.bmp') or 40 FileExists(HomeDir + 'Graphics\Background.png') then 42 41 begin 43 img:=TBitmap.Create;44 LoadGraphicFile(img, HomeDir+'Graphics\Background');42 img := TBitmap.Create; 43 LoadGraphicFile(img, HomeDir + 'Graphics\Background'); 45 44 end 46 45 end 47 else46 else 48 47 begin 49 WindowState:=wsNormal;50 Width:=StartDlg.Width+16;51 Height:=StartDlg.Height+16;52 Left:=StartDlg.Left-8;53 Top:=StartDlg.Top-8;48 WindowState := wsNormal; 49 Width := StartDlg.Width + 16; 50 Height := StartDlg.Height + 16; 51 Left := StartDlg.Left - 8; 52 Top := StartDlg.Top - 8; 54 53 end 55 54 end; … … 57 56 procedure TBackground.FormPaint(Sender: TObject); 58 57 begin 59 if img<>nil then 60 BitBlt(Canvas.Handle, 61 Screen.Width-img.Width-(Screen.Width-800)*3 div 8, 62 (Screen.Height-600) div 3, 63 img.Width,img.Height, 64 img.Canvas.Handle,0,0,SRCCOPY); 58 if img <> nil then 59 BitBlt(Canvas.Handle, Screen.Width - img.Width - (Screen.Width - 800) * 60 3 div 8, (Screen.Height - 600) div 3, img.Width, img.Height, 61 img.Canvas.Handle, 0, 0, SRCCOPY); 65 62 end; 66 63 67 64 procedure TBackground.FormClose(Sender: TObject; var Action: TCloseAction); 68 65 begin 69 if img<>nil then begin img.Free; img:=nil end; 66 if img <> nil then 67 begin 68 img.Free; 69 img := nil 70 end; 70 71 end; 71 72 72 73 end. 73
Note:
See TracChangeset
for help on using the changeset viewer.