Autor Beitrag
DanyLux
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 55

Win 2000, WinXP SP2
D7 Ent
BeitragVerfasst: Do 21.04.05 12:11 
Hallo users des Delphi-Forum,

Also ich hab folgendes problem. Ich programmiere gerade ein spiel was sich quzzle nennt, fuer di di nicht wissen was es ist -->Quzzle.

Ich hab ein zwei-Dimensionales array 5x4, wie auf der webseite, wo ich die IDs der Spiel-Bloecke speichere. Block 2x2: ID=22; 2x1: ID=21; 1x2: ID=12; 1x1: ID=11. Das sieht dann so aus:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
        X
   22 22 21 21   
   22 22 12 12
 Y 00 00 12 12
   12 21 21 11
   12 21 21 11

so geh ich duerch die Tabell for Y:=0 to 4 do for X:=0 to 3

In einem seperaten array von 4 Felder hab ich dit Bitmaps von den jeweiligen bloecke.

Wenn der Formular dann erstellt wird werden die Bitmaps erstellt und angezeigt.
Was ich dan eigentlich tun moechte ist die Bitmaps anklicken und verschieden, leider hab ich keine ahnung wie ich das anstell soll??? Hab schon im Forum durchgeschaut hab leider nichts gefunden, oder habs villeicht uebersehen! :P :roll:

Danke im Voraus fuer eure Antwort

_________________
MfG aus Luxemburg
webbi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 142

Win XP Pro SP2, Debian GNU/Linux 2.6
D5 Pro, D7 Pro, BDS2006, Kylix3, MS-VS 2005
BeitragVerfasst: Do 21.04.05 16:29 
Wenn ich dich richtig verstanden habe:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
   TWincontrol(sender).perform(WM_LBUTTONUP, 0, 0);
   TWincontrol(sender).Perform(WM_SysCommand,SC_MOVE+2,2);
end;