Autor Beitrag
kampfkoloss23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 96



BeitragVerfasst: Fr 03.01.03 01:14 
HAllo :P

Ich Programmiere gerade ein Zielkreuz für ein Spiel. Mit Getcursorpositon() ruft man den aktuellen Ort ab, aber ich hab nicht gefunden, wie man:
  1. Position von Cursor festlegt
  2. Am besten Cursor unsichtbar macht
    (um Ortsdaten für neuen Cursor zu benutzen)

Weiß vielleicht einer von euch den Befehl??

(Ich hasse feste Hilfe im Delphi Programm, die ist so *mist*e und hat nicht mal die Hälfte der möglichen Befehle. Die hätten sich ruhig mal mehr anstrengen können. Ich gehe alle 50-60 Einträge über Mäuse durch und nichts genaues steht drin!!! :autsch: )
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Fr 03.01.03 02:12 
zum setzten:
ausblenden Quelltext
1:
SetCursorPos (10,40);					

zum unsichtbar:
ausblenden Quelltext
1:
Form1.Cursor := -1;					

Gruß
Torsten

(03.01. 09:56 Tino) Code-Tags hinzugefügt.
Leathl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Fr 03.01.03 02:22 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 12:56, insgesamt 1-mal bearbeitet
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Fr 03.01.03 02:25 
ja, die kan man auch benutzen

achso: man kann im objektinspektor die -1 auch reinschreiben

crnone nicht :wink:
Dev4u.ch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 36



BeitragVerfasst: Fr 03.01.03 10:42 
doch

crNone kann man auch reinschreiben..

unter Coursor

8)

_________________
Jedes Programm wurde von einem Menschen gecodet - Menschen machen nun mal Fehler!!
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Fr 03.01.03 10:55 
ne, bei mir kommt da ein fehler, das er nicht weiß, was crnone ist!!!
egal
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Fr 03.01.03 11:02 
Hallo,
torstenheinze hat folgendes geschrieben:
ne, bei mir kommt da ein fehler, das er nicht weiß, was crnone ist!!!

dann nehme mal die Controls in deine USES Klausel ein. Dann sollte das gehen.

Gruß
Klabautermann
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Fr 03.01.03 11:04 
ok, danke für den tipp

wenn ich das als quelltext eingebe, das ging das auch schon vorher, nur eben im objectinspector, da gings net, aber egal
kampfkoloss23 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 96



BeitragVerfasst: Fr 03.01.03 17:50 
Danke an schon mal :lol:

Es funkzt, doch wie nimmt man die Control in die Uses klausel auf??
Einfach reinschreiben oder? Aber was genau?


(Tschuldigung für die Frage, aber ich hab halt noch nich so viel Ahnung)
DaFox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 189



BeitragVerfasst: Fr 03.01.03 18:41 
Hi!

Richtig. Entweder Du fügst Controls einfach ein, indem Du es hinten an uses anhängst:

ausblenden Quelltext
1:
uses ..., Controls;					


oder du definierst Dir crNone selbst:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
type
  TCursor = -32768..32767;
...
const
  crNone = TCursor(-1);

var
  Form1: TForm1;
...
procedure TForm1.FormCreate(Sender: TObject);
begin
  Screen.Cursor := crNone;
end;


Gruß,
Markus