Autor Beitrag
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 16.11.06 17:23 
Hallo

Ich habe ein Problem: Ich möchte, dass bei einer bestimmten Aktion ein bestimmtes Formular an der Position des mauszeigers erscheint.
Ich habe das bisher mit folgenden Quellcode gemacht:
ausblenden Delphi-Quelltext
1:
2:
form_disp_help.Top := mouse.CursorPos.Y;
form_disp_help.Left := mouse.CursorPos.X;

Das hat auch alles bei mir auf dem Rechner super funktioniert, bis ich das Programm auf einem Rechner mit mehreren Bildschirmen gestartet habe. Da erscheint das Formular überhaupt nicht am Mauszeiger sondern irgendwo auf einem ganz anderen Bildschirm.

Woran liegt das, und wie kann ich diesen Problem beheben ?


Vielen Dank

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

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Do 16.11.06 17:31 
Bei mir geht das ohne Probleme und ich hab 2 Bildschirme.

Vllcht kannst du noch ein bisschen mehr Code posten:
-Wann wird was ausgeführt
-Wird die Platzierung irgendwo anders im Code noch beeinflusst?
-...?

Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 16.11.06 17:49 
nein das ist wirklich die einzige Stelle im Quelltext wo Left und Top gesetzt werden.
Das Problem ist, dass ich das hier daheim nicht reproduzieren kann, weil ich nur einen Monitor habe...

Kann das evtl noch andere Gründe haben.. z.b. dass die Monitore in Windows anders angeordnet sind (In dem Anzeige-Dialog)

Edit: ausgeführt wird der Code in einer OnDrop Routine

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

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Do 16.11.06 19:03 
Also mein primärer Monitor steht links, der zweite rechts daneben... :roll:

_________________
Programmers never die, they just GOSUB without RETURN
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 17.11.06 13:24 
und wenn du die jetzt mal vertauscht. also in der Systemsteuerung -> Anzeige per Drag & drop verschiebst ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.