Autor Beitrag
volvox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 112

WIN XP
Delphi 7 Personal
BeitragVerfasst: So 03.09.06 09:23 
Hi, ich möchte, dass wenn ich mit der Maus über eine bestimmte Stelle der Form gehe ein Bild erscheint, und wieder verschwindet wenn ich die Maus weiterbewege.
Ich habe dafür an diese Stelle ein unsichtbares Image gelegt, und in das Ereignis "onMouseMove" geschrieben image.visibel:=true.
Dummerweise reagiert das Image nicht auf die Mausbewegung wenn es invisible ist.

Welche anderen Möglichkeiten hab ich denn da noch?

Gruß Philipp
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 03.09.06 09:58 
-Austausch des Bildes, das mit TImage verknüpft ist.
-Verlagern des Events in die Form.

_________________
Markus Kinzler.
volvox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 112

WIN XP
Delphi 7 Personal
BeitragVerfasst: So 03.09.06 12:38 
Und wie?
DaKirsche
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

Win XP Pro, SuSe Linux 7.3 - 10.2, Win 2k3 Server, Win 2000, Win NT 4.0
Delphi 2006 Pro, Java, HTML, SQL, PHP, CSS
BeitragVerfasst: Mi 06.09.06 08:35 
So, nicht schön, aber selten :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
if (x>image1.left - 1) AND (x<image1.left + image1.width +1) AND (y<image1.top + image1.height) AND (y>image1.top -1) then begin
    image1.visible:=true;
end else
    image1.visible:=false;
end;


Vorher musst du manuell das gewünschte Bild ins Image laden und ggf. Größe anpassen.
volvox Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 112

WIN XP
Delphi 7 Personal
BeitragVerfasst: Mi 06.09.06 15:30 
Danke. Ich versuchs mal!