Problema Delphi 7

Pascal este un limbaj imperativ, creat inițial pentru a ajuta la predarea noțiunilor de programare structurati studenților. Delphi, urmașul lui Pascal, este un mediu de dezvoltare pentru aplicații Windows. Delphi este primul limbaj de programare (Object Pascal, mai exact) care a îmbinat ușurința în programare a limbajelor de nivel înalt și puterea uneltelor de lucru de nivel scăzut într-un mediu RAD.

Problema Delphi 7

Postby sharky92 » 05 Feb 2011, 22:21

Aseara am terminat un mic joc in Delphi 7 si acum as vrea sa ii mai adaug un Form2 de unde sa deschid Form1(jocul) , doar ca atunci cand pornesc programul , imi apare si jocul , nu pot sa ascund Form1. In schimb Form2 pot sa il fac invizibil. O solutie :D ?...Multumesc.
0,0p / 0 votes
User avatar
sharky92
Bit
 
Joined: 09 Nov 2010
Status: 2

Re: Problema Delphi 7

Postby smith » 05 Feb 2011, 22:31

Form1.visible := false; ?
0,0p / 0 votes
Ilea Cristian
User avatar
smith
Enum
 
Joined: 29 Dec 2009
Location: Cluj-Napoca
Status: 82

Re: Problema Delphi 7

Postby sharky92 » 05 Feb 2011, 23:27

Am incercat cu proprietatea visible dar nu merge . Ma gandesc ca nu poti face Form1 invizibila , doar celelalte Form 2 , Form3 etc.


L.E. (-- 05 Feb 2011, 22:27 --)

Problema rezolvata cu ShellExecute.
0,0p / 0 votes
User avatar
sharky92
Bit
 
Joined: 09 Nov 2010
Status: 2

Re: Problema Delphi 7

Postby DarkByte » 05 Feb 2011, 23:47

Schimba ordinea formelor create (sa-ti afiseze Form2 in loc de Form1). Alternativ, sunt alte metode, mai complexe (daca ai nevoie sa ascunzi TOATE formele la lansarea programului - gen QuickBar)

P.S. m-ai facut EXTREM de curios. Ce-ai rezolvat cu ShellExecute ?!?
0,0p / 0 votes
User avatar
DarkByte
11011011
 
Joined: 29 Dec 2009
Status: 140

Re: Problema Delphi 7

Postby v0id » 05 Feb 2011, 23:49

What the... !?
+1 la intrebarea ce-ai rezolvat cu ShellExecute?
0,0p / 0 votes
A good coder is never on holiday - he may be working on a different machine, that's about as far as it gets.
User avatar
v0id
Word
 
Joined: 05 Jan 2010
Location: 127.0.0.1
Status: 42.5

Re: Problema Delphi 7

Postby sharky92 » 05 Feb 2011, 23:49

Am creat un nou proiect in Delphi , de unde deschid doar executabilul jocului , cu ShellExecute.
0,0p / 0 votes
User avatar
sharky92
Bit
 
Joined: 09 Nov 2010
Status: 2

Re: Problema Delphi 7

Postby v0id » 05 Feb 2011, 23:56

I sense a disturbance in the Force...

In fine... In fisierul .DPR al proiectului tau care are 2 form-uri deja, ai 2 linii de genul:
  1.  
  2. Application.CreateForm(TForm1, Form1);
  3. Application.CreateForm(TForm2, Form2);
  4.  


Tot ce trebuie sa faci este sa le modifici ordinea:
  1.  
  2. Application.CreateForm(TForm2, Form2);
  3. Application.CreateForm(TForm1, Form1);
  4.  


Recompilezi si gata.
1p / 1 votes
A good coder is never on holiday - he may be working on a different machine, that's about as far as it gets.
User avatar
v0id
Word
 
Joined: 05 Jan 2010
Location: 127.0.0.1
Status: 42.5

Re: Problema Delphi 7

Postby DarkByte » 05 Feb 2011, 23:59

v0id wrote:I sense a disturbance in the Force...

The Force was quite raped, all right :))
0,0p / 0 votes
User avatar
DarkByte
11011011
 
Joined: 29 Dec 2009
Status: 140

Re: Problema Delphi 7

Postby sharky92 » 06 Feb 2011, 12:22

Ms DarkByte si v0id voi incerca si varianta asta .
0,0p / 0 votes
User avatar
sharky92
Bit
 
Joined: 09 Nov 2010
Status: 2

Re: Problema Delphi 7

Postby v0id » 06 Feb 2011, 20:43

Asta nu e o varianta care trebuie doar incercata. Trebuie folosita!
Ce-o sa faci cand o sa ai un proiect cu 20 de form-uri? Creezi cate un executabil pentru fiecare form?

Nota: Cum a spus si DarkByte, sunt si alte variante de rezolvare a problemei tale, dar cea pe care am prezentat-o este cea mai simpla. Momentan chiar nu cred ca e cazul sa intram in detalii despre alte metode.
0,0p / 0 votes
A good coder is never on holiday - he may be working on a different machine, that's about as far as it gets.
User avatar
v0id
Word
 
Joined: 05 Jan 2010
Location: 127.0.0.1
Status: 42.5


Return to Pascal / Delphi

Who is online

Users browsing this forum: No registered users and 0 guests