![]() |
Create game-like Full-Screen
Hello,
Excuse my Englisch, My German is awfull, but I can read it. As a self-educated programmer I'm trying to write sort of a game in Delphi. For that game I want a fully black screen, where I will draw figures etc, etc. <ESC> goes back to normal screen. I don't get it done... lost in bitmaps, canvasses, images, windowstates etc... Can somebody help me out? T.I.A. Cadere |
Re: Create game-like Full-Screen
Try this:
Set your Boderstyle on bsnone and increase your form to the size of the screen:
Delphi-Quellcode:
form1.Top :=0;
form1.Left:=0; form1.Width:=screen.Width; form1.Height:=screen.Height; |
Re: Create game-like Full-Screen
Hi Cadere :hi:
Welcome to the Delphi-PRAXiS. Try to set the settings in the Object-Inspector at your Form:
Delphi-Quellcode:
when you go to Fullscreen... that should make your window large enough for fullscreen. You need to set your components with anchors, so they will be always the right position and size. I hope so... :mrgreen:
Form1.Formstyle := fsStayOnTop;
Form1.WindowState := wsMaximized; BorderStyle := bsNone; edit: Damned... no red box :mrgreen: 2nd edit: Ehm... I think my code would not work as it has to. But there's a better version ;) |
DP-Maintenance
Dieses Thema wurde von "sakura" von "Neuen Beitrag zur Code-Library hinzufügen" nach "Multimedia" verschoben.
moving off to the correct category :) |
Re: Create game-like Full-Screen
Zitat:
Ich kann das auf Englisch zu später Stunde nicht mehr erklären, aber vllt. kann das einer für mich übernehmen: ![]() |
Re: Create game-like Full-Screen
Nice contributions so far... thanx... but not yet.. : The One"
We are talking about a Form2, activated by the start-button in the game on Form1... Your solution looks good Nicolai, but I dont have a unit or VCL that supports dmScreemsettings. (I suppose with DelphiWorks I can create the same routine) I guess the activating of form2 and restoring the screen afterwards will be interesting problems. It is now too late to continue.. tomorrow is another day, my boss likes me more when I'm fit... By the way... contributions in German are just as welcome as contributions in English. :roteyes: goodnight |
Re: Create game-like Full-Screen
Delphi-Quellcode:
procedure MakeFullScreenForm(form : TForm);
begin Assert(Assigned(form)); Form.BorderStyle := bsNone; Form.FormStyle := fsStayOnTop; Form.SetBounds(0, 0, Screen.Width, Screen.Height); end; |
Re: Create game-like Full-Screen
Okay shmia, this does the job.
After all so easy... thank you... |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:21 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz