Autor Beitrag
conqueror
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19

xp

BeitragVerfasst: Mi 26.04.06 10:57 
moin moin

hab da ein kleines problem... wir sollten ein memory machen. is ja alles ganz einfach oder so:D

also ich hab nun gemacht, wenn man auf nen button klickt dann verschwindet der button und das bild dahinter erscheint. ok bis jetzt alles easy aber... jetzt sollte mit hilfe einer if funktion (so hab ich das vor...) folgendes geschehen:

wenn man das erste bild aufdeckt geschieht nichts aber wenn man dann ein 2tes bild aufmacht, dann sollte das program überprüfen ob es die selben bilder sind. ist die der fall geschieht vorläufig nichts mehr. sollte es aber nicht der fall sein so werden beide wieder verdeckt das heisst die buttons werden wieder visible.

hier ma den code so wie ich ihn jetzt hab:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
procedure TForm1.BBtn1Click(Sender: TObject);
begin

image1.Visible:= true;

if image1.Visible= true then
BBtn1.Visible:= false;

begin

if image1b.Visible = true then
else
begin
image1.Visible := false;
BBtn1.Visible := true
end;

{if image1b.Visible = true then
  else
begin image1.Visible := false;  image1b.Visible := false;
BBtn1.visible := true;
end;
//if image1b.Visible = true then image1 := image1b}




end;
end;



so kann mir da jemand helfen? bin jetzt ne stunde dran und nich weiter gekommen.

thx schon ma für die antworten

grezz conqueror

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 26.04.06 11:27 
Moin und :welcome: im Forum!

Schau mal hier, das sollte dir weiterhelfen. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
conqueror Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19

xp

BeitragVerfasst: Mi 26.04.06 11:50 
hmm jo das hilft mir irgendwie:D nur ehm ja hmm da ich die bilder schon definiert hab und einfachheitshalber alles fest habe bekomm ich ein durcheinander:P

gibt es keinen einfacheren weg ich mein einfach zu sagen: wenn bild eins aufgedeckt ist und bei click 2 das andere bild = bild eins ist dann bleiben sie sonst werden beide wieder verdeckt?

grezz conq
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 26.04.06 11:58 
Moin!

Du kannst unmöglich in der kurzen Zeit das Tut durchgezogen haben. ;)

Mein Rat: mach mal das Tut, dann wird dir klar, wie du das Problem lösen kannst, auch in deinem Code.

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
conqueror Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19

xp

BeitragVerfasst: Mi 26.04.06 12:00 
hmm das ganze hat nur den hacken ich hab bis morgen zeit das ganze zu machen und zu dokumentieren :P aber häng mich ma rein da
chriss1988
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 389

windows xp prof,home,windows98
delphi5
BeitragVerfasst: Mi 26.04.06 12:03 
du hast es doch eben schon gesagt so musst dus auch schreiben

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
if  BBtn1Click then 
   image1.Visible:= true; 


if imagel=imagelb then
begin
   image1.Visible:= true; 
   image1b.Visible = true;
end

else
image1.Visible:= false; 
   image1b.Visible = false;


ich kenn zwar nicht die einzelnen begriffe aber so in der richtung müsste das gehn
conqueror Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19

xp

BeitragVerfasst: Mi 26.04.06 12:26 
jo nur wenn ich das so schreibe dann kann ich den ersten nich mehr öffnen. nur dann wenn ich den 2ten offen hab...
conqueror Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19

xp

BeitragVerfasst: Mi 26.04.06 13:53 
so tut is durch hab sogar ads ganze neu gemacht ;)

thx an alle tut is wirklich super... das ganze is zwar kompliziert aber ja is beim programmieren so;)

grezz conq
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 26.04.06 13:58 
Moin!

Wenn dein Problem gelöst ist, markierst du dann den Thread noch entsprechend? Danke. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
conqueror Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 19

xp

BeitragVerfasst: Mi 26.04.06 14:01 
hab isch gemacht;)

grezz an alle die das lesen hf beim programmieren und bla bla:D

conqueror

ps: liebe gruess us dr schöne schwiz... thomas