AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Create game-like Full-Screen
Thema durchsuchen
Ansicht
Themen-Optionen

Create game-like Full-Screen

Ein Thema von Cadere · begonnen am 29. Sep 2005 · letzter Beitrag vom 2. Okt 2005
Antwort Antwort
Benutzerbild von Cadere
Cadere

Registriert seit: 22. Jun 2004
Ort: Helmond
5 Beiträge
 
Delphi 5 Enterprise
 
#1

Create game-like Full-Screen

  Alt 29. Sep 2005, 21:56
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
  Mit Zitat antworten Zitat
Benutzerbild von Nikolas
Nikolas

Registriert seit: 28. Jul 2003
1.528 Beiträge
 
Delphi 2005 Personal
 
#2

Re: Create game-like Full-Screen

  Alt 29. Sep 2005, 22:02
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;
Erwarte das Beste und bereite dich auf das Schlimmste vor.
  Mit Zitat antworten Zitat
Benutzerbild von malo
malo

Registriert seit: 19. Sep 2004
2.115 Beiträge
 
#3

Re: Create game-like Full-Screen

  Alt 29. Sep 2005, 22:05
Hi Cadere

Welcome to the Delphi-PRAXiS.

Try to set the settings in the Object-Inspector at your Form:
Delphi-Quellcode:
Form1.Formstyle := fsStayOnTop;
Form1.WindowState := wsMaximized;
BorderStyle := bsNone;
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...

edit: Damned... no red box

2nd edit: Ehm... I think my code would not work as it has to. But there's a better version
  Mit Zitat antworten Zitat
29. Sep 2005, 22:08
Dieses Thema wurde von "sakura" von "Neuen Beitrag zur Code-Library hinzufügen" nach "Multimedia" verschoben.
moving off to the correct category
Nicolai1234

Registriert seit: 21. Feb 2004
1.008 Beiträge
 
Turbo Delphi für Win32
 
#5

Re: Create game-like Full-Screen

  Alt 29. Sep 2005, 22:32
Zitat:
... that should make your window large enough for fullscreen.
but it isn't a fullscreen. It's just a great form.

Ich kann das auf Englisch zu später Stunde nicht mehr erklären, aber vllt. kann das einer für mich übernehmen:
http://www.delphipraxis.net/internal...=363175#363175
  Mit Zitat antworten Zitat
Benutzerbild von Cadere
Cadere

Registriert seit: 22. Jun 2004
Ort: Helmond
5 Beiträge
 
Delphi 5 Enterprise
 
#6

Re: Create game-like Full-Screen

  Alt 29. Sep 2005, 23:46
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.

goodnight
  Mit Zitat antworten Zitat
shmia

Registriert seit: 2. Mär 2004
5.508 Beiträge
 
Delphi 5 Professional
 
#7

Re: Create game-like Full-Screen

  Alt 30. Sep 2005, 09:54
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;
Andreas
  Mit Zitat antworten Zitat
Benutzerbild von Cadere
Cadere

Registriert seit: 22. Jun 2004
Ort: Helmond
5 Beiträge
 
Delphi 5 Enterprise
 
#8

Re: Create game-like Full-Screen

  Alt 2. Okt 2005, 20:32
Okay shmia, this does the job.
After all so easy...

thank you...
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:25 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz