Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 12:27 
Hi leutz wie kan ich mache n das der mauszeiger meines programmes cursor.jpg ist ??????????????
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mo 18.04.05 13:51 
Geht nicht: Jpg unterstützt keine Transparenz (was auch bei einem solchen Format nicht so wirklich gut möglich ist). Im Jpg ist auch nicht gespeichert wo der Hot-Spot ist. Für Cursors gibt es .cur-Dateien. Benütz mal die Forensuche.

PS: Deine "?"-Taste scheint kaputt zu sein.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 18.04.05 14:10 
du könntest aber ein JPG auf einem Formular dem Mauszeiger folgen lassen.
Den mauszeiger musst du derweil halt ausbauen.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 14:43 
@Matze wie geht das :roll:
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 18.04.05 14:49 
Soll der Cursor ganz dynamisch sein? Soll heissen: Der User kann ein eigenes jpg als Cursor auswählen können, oder möchtest du einfach einen schöneren Cursor haben?
Im ersten Fall: weiter bei Matze. Ansonsten: Schau dich mal nach nem Editor für Cursor um und bastel dir aus deinem jpeg die cur-Datei. Das dürfte dann einfacher und wahrscheinlich performanter sein.

_________________
We are, we were and will not be.
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mo 18.04.05 14:50 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure OnMouseMove(...);
begin
  Image1.Left := Mouse.GetPos.X;
  Image1.Top := Mouse.GetPos.Y;
end;

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mo 18.04.05 14:55 
Ja, wie geht das denn? Ich würde sagen: programmieren! Da kommst du nicht drum herum.

Aber hier ein kleines Beispiel von mir. Vielleicht fällt dir dabei selbst ein wie es geht. Es zeigt zumindest das Prinzip.

Ein Tipp: Wenn du im Programm nicht weiter kommst, dann denk an die RECHTE Maustaste ;)
Einloggen, um Attachments anzusehen!
_________________
Popov
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mo 18.04.05 14:57 
Ein TImage der Maus folgen zu lassen ist - ausser bei Games u.ä. - imho sehr unprofessionell. Was soll aus allen Mausklicks werden?

@Popov: Ohne dir zu nahe treten zu wollen: Wo bleibt der Sinn in deinem Programm, wenn ohne Source? (Es zeigt 1. nicht was er will / hilft nicht weiter, 2. ist das ganze eher eine Verarschung als eine hilfreiche Demo. No offense.)
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mo 18.04.05 15:11 
user profile icondelfiphan hat folgendes geschrieben:
@Popov: Ohne dir zu nahe treten zu wollen: Wo bleibt der Sinn in deinem Programm, wenn ohne Source?


Es soll DelphiDelphin dazu animieren darüber nachzudenken. Wie es funktioniert? Das kann man durch die Funktionsweise erkennen.

Das es mit Cursors aus Jpg nichts richtiges wird, ist doch klar. Es kann nur eine Spielerei sein. Wenn er es aber in seinem Programm einbauen will, dann bitte. Es gibt auch Leute (ich hatte so ein Programm) die waren in das 3D so verliebt, daß sie 10 Pixel Breite dafür genommen haben. Das Programm sah zu löschen schön aus.

_________________
Popov
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 16:54 
Hm getpos wir dbei mir immer unterstrichen ??????????
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mo 18.04.05 16:59 
Mir ist gestern blöderweiße meine Kristallkugel runtergefallen.
Jetzt kann ich leider nicht deinen Source angucken, außer du postes ihn hier.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 17:03 
ausblenden volle Höhe 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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
unit Unit3;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, jpeg, ExtCtrls;

type
  TForm3 = class(TForm)
    Image1: TImage;
    procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}




procedure TForm3.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
Image1.Left := Mouse.GetPos.X;
Image1.Top := Mouse.GetPos.Y;

end;

end.
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mo 18.04.05 17:04 
user profile iconDelphiDelphin hat folgendes geschrieben:
Hm getpos wir dbei mir immer unterstrichen ??????????


GetPos ist auch kein Befehl :?
Richtig heisst der GetCursorPos oder mouse.cursorpos.

Ps.: Denk doch einfach mal nach...warum packst du den Code ins on MouseMove des "cursors" ?


Zuletzt bearbeitet von Karlson am Mo 18.04.05 17:06, insgesamt 1-mal bearbeitet
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mo 18.04.05 17:04 
:oops: Muss CursorPos.X heißen :oops:

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 17:32 
Hi und wie kann ich jetzt noch den cursor wegmachen :roll:
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 18.04.05 17:39 
ganz einfach: showcursor(false);

_________________
In the beginning was the word.
And the word was content-type: text/plain.
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 18.04.05 17:42 
IIRC ShowCursor(false); aber wieso machst du das in die Image1MouseMove... klappt das überhaupt? ausserdem gehen die mausklicks dann immer aufs immage. ich würds in die form mousemove (und in alle elemente der form) packen und ausserdem das image ein pixel weiter unten erscheinen lassen...

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mo 18.04.05 17:45 
jop hab ich inwzwischen auch schon gemacht :roll:
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: Mo 18.04.05 18:15 
Zitat:

Muss CursorPos.X heißen

eigentlich muss es X bzw Y heißen :D
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mo 18.04.05 18:40 
Schlaumeier.

Du kannst auch den Cursor so verstecken:
ausblenden Delphi-Quelltext
1:
  Form1.Cursor := crNone;					

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)