Autor Beitrag
Xabitire
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 114

Win Xp, Win Vista
D6 PE, D7 PE
BeitragVerfasst: Mo 26.02.07 18:51 
Hi leute,

ich hätt gern, dass auf einem bestimmten Bereich meines Forms kein Cursor mehr angezeigt wird und die Einstellung crnone für meinen Cursor gibt es leider nicht! :cry: :cry: :cry:

Bin auch schon auf die Idee gekommen, einen eigenen Cursor zu kreieren, allerdings weiß ich nicht, wie ich ihn dann unter die Auswahl von Delphi bringen soll! :?:

Gibts da überhaupt ne Möglichkeit?

thx schonmal
Xabitire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 114

Win Xp, Win Vista
D6 PE, D7 PE
BeitragVerfasst: Mo 26.02.07 18:59 
lol! bin gerade mal hingegangen und hab einfach unter onformcreate den befehl form1.cursor:= clnone eingegeben, und dann war er weg, sry für (dann sinnlose) Frage!

hab aber extra nochmal nachgeschaut, wenn man es unter dem objektinspektor einstellen will gibt es kein clnone!

bin doch ein dussel!

nochmals sry!
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Mo 26.02.07 19:00 
Hi,

setzte ein TImage auf deine Form und schreibe:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormActivate(Sender: TObject);
begin
 Image1.Cursor := crNone;
end;


Gruß

Saubäär


Zuletzt bearbeitet von Saubäär am Mo 26.02.07 19:03, insgesamt 1-mal bearbeitet
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 26.02.07 19:02 
In welchem Bereich soll das sein? Lege doch eine unsichtbare Komponente dorthin (Ein leeres TImage z.B.) und führe im onMouseMove diesen Code aus: ShowCursor(false);
Dann im onMouseMove der Form (bzw der anderen, angrenzenden Komponenten) ShowCursor(true);, ähnlich wie Saubäär das schon gesagt hat.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Bääääär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 117



BeitragVerfasst: Mo 26.02.07 19:56 
und wieso nicht eine Abfrage im onmousemove?
mit pointinrect fragst du ab, ob sich der cursor im Rect befindet, wenn ja, dann blendest du ihn aus.
du kannst aber auch ein Bitmap erstellen, dass schwarze und weiße pixel hat und genauso groß ist, wie deine Form. Dieses Bitmap verwendest du als Maske. Dann machst du im onmousemove eine Abfrage rein, in der du prüfst, ob der Pixel im Bitmap, der die koordinaten deiner kursorposition hat, schwarz ist, wenn ja, dann blendest du den kursor aus. Damit kannst du für jeden Pixel festlegen, ob der krusor da sein soll, oder nicht.