Autor Beitrag
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 28.05.09 19:07 
user profile icononeP hat folgendes geschrieben Zum zitierten Posting springen:
der vorherige code von dir zeigt wie gesagt diesen fehler an
Mein Code? Die zweite Zeile hast du dir ausgedacht... und die erste funktioniert.

user profile icononeP hat folgendes geschrieben Zum zitierten Posting springen:
und beim Folgendem kann man das Programm starten aber es wird kein neuer Cursor gezeigt
Wie sieht da deine .rc Datei aus?
(Ich mach am besten ne Demo mit nem Windows-Cursor.)
oneP Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 71

Win XP Professional
Turbo Delphi 2006
BeitragVerfasst: Do 28.05.09 19:14 
Zitat:
Mein Code? Die zweite Zeile hast du dir ausgedacht... und die erste funktioniert.


trotzdem weiß ich nicht wie man diesen Fehler mit "TPicture und Integer" beseitigt und diese Links helfen mir auch nicht weiter :?

Zitat:
Wie sieht da deine .rc Datei aus?
(Ich mach am besten ne Demo mit nem Windows-Cursor.)


Beim Cursor: (in der dritten zeile:)Cursor CUR "Cursor.cur"
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 28.05.09 19:15 
user profile icononeP hat folgendes geschrieben Zum zitierten Posting springen:
trotzdem weiß ich nicht wie man diesen Fehler mit "TPicture und Integer" beseitigt
Die Zeile löschen, meine Zeile war alles, wenn du da noch mehr dir hinzuausdenkst... :roll:

user profile icononeP hat folgendes geschrieben Zum zitierten Posting springen:
Beim Cursor: (in der dritten zeile:)Cursor CUR "Cursor.cur"
Der Typ ist analog zur Bitmap CURSOR...
// EDIT: Ohne RC

// EDIT2:
So, Demo im Anhang...
Einloggen, um Attachments anzusehen!
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Do 28.05.09 19:34 
Hier könntest du sogar noch ein bisschen debuggen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
const 
      Cursor =3;

implementation

{$R *.dfm}
{$R Resource.res}

procedure TForm2.FormCreate(Sender: TObject);
 var CursorHandle: THandle;
begin
  CursorHandle := LoadCursor(HInstance, 'Resource');
  if CursorHandle <> 0 then
    Screen.Cursors[Cursor] := CursorHandle
  else
    ShowMessage('Der Cursor konnte nicht geladen werden');
  Form2.Cursor := Cursor
end;
oneP Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 71

Win XP Professional
Turbo Delphi 2006
BeitragVerfasst: Do 28.05.09 21:49 
Vielen Dank jaenicke für die Demo!

Die hat mir echt geholfen und mein Cursor verändert sich jetzt endlich.
Und danke auch, dass es so schnell ging.