Autor Beitrag
BadAzz
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: So 18.12.05 17:08 
ich habe bei suche nichts gefunden was mir weiter helfen könnte. ich suche den code der den button an eine beliebige stelle verschiebt wenn mous over!!! kann mir jemand helfen?


Moderiert von user profile iconChristian S.: Topic aus Sonstiges verschoben am So 18.12.2005 um 17:15
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: So 18.12.05 17:17 
wenn ich das richtig verstanden hab willst du wenn die maus über nem button is den woanders hin "schmeißt"?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.Button1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  Button1.Left:= Random(Form1.Width - Button1.Width) + 1;
  Button1.Top:= Random(Form1.Height - Button1.Height) + 1;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Randomize;
end;


so das dürfts schon gewesen sein...


Zuletzt bearbeitet von Ironwulf am So 18.12.05 17:20, insgesamt 1-mal bearbeitet
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: So 18.12.05 17:19 
und dazu hast du nichts gefunden, dann bin ich mir gaaaanz sicher, dass du nicht gesucht hast ! GENAU DEN CODE gibts hier bestimmt schon 1-2 mal, ansonsten hätte es gereicht auf den befehl random zu stoßen, um eine lösung zu finden :!:

kommt wahrscheinlich von deiner rechtschreibschwäche:

Zufalls Posizion von Buton
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: So 18.12.05 17:43 
Versuchst Du gerade irgendwie möglichst viele Typen aus diesem Text in Dir zu vereinen? :gruebel:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
maxstegi
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 26

WIN XP SP2 (Suse Linux 10.0 OSS)
Delphi 2005 PE
BeitragVerfasst: So 18.12.05 18:03 
nimm vielleicht statt

Form1.Width
--> Form1.ClientWidth

und

Form1.Height
--> Form1.ClientHeight



Max
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: So 18.12.05 18:15 
user profile iconChristian S. hat folgendes geschrieben:
Versuchst Du gerade irgendwie möglichst viele Typen aus diesem Text in Dir zu vereinen? :gruebel:


ich bin eben ein ganzes forum für mich ;)