Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 To: Ray Tawil
  Where is Ray Tawil?
 Oregon
 Ohio - United States
 Ray Tawil
 Tags
Subject: RE: Changing images through event
Thread ID: 209566 Message ID: 209585 # Views: 2 # Ratings: 1
Version: Visual FoxPro 9 Category: Forms
Date: Monday, December 29, 2008 6:09:36 PM         
   


> Hello community,
>
> i have an image control i want on the
>
> "Mouse enter" event make the image1 change to image2 & on the
> "Mouse leave" event reset the image back to image1
>
> the problem is whenever i place the mouse over the image the other image starts flikering very fast.
> i thought of adding a timer or somthing like that but it doesnt seem to work so far... here's the syntax:
>
> mouse enter:
> 
> LPARAMETERS nButton, nShift, nXCoord, nYCoord
> thisform.Themedtitlepageframe.themedtitlepage1.userControls.timer1.Enabled = .T. 
> thisform.Themedtitlepageframe.themedtitlepage1.userControls.image1.Visible = .F.
> thisform.Themedtitlepageframe.themedtitlepage1.userControls.image7.Visible = .T.
> 
> mouse leave:
> 
> LPARAMETERS nButton, nShift, nXCoord, nYCoord
> thisform.Themedtitlepageframe.themedtitlepage1.userControls.timer1.Enabled = .T. 
> thisform.Themedtitlepageframe.themedtitlepage1.userControls.image1.Visible = .F.
> thisform.Themedtitlepageframe.themedtitlepage1.userControls.image7.Visible = .T.
> 


There is no need for Timers and VISIBLE property.

Drop an image on the form and set its Picture property to image1

Mouse Enter
This.Picture = "image2.bmp"

Mouse Leave
This.Picture = "image1.bmp"

If you are assigning the PICTURE to an image already loaded just change the commands as:
Mouse Enter
This.Picture = image2.picture

Mouse Leave
This.Picture = image1.picture

Using Timers and Visible causes the flashing and is un necessary.



Bernard

** If you see someone without a smile, give em one of yours :) **
My Blog 8-)

ENTIRE THREAD

Changing images through event Posted by Rabih Tawil @ 12/29/2008 4:46:42 PM
RE: Changing images through event Posted by Bhushan Sahni @ 12/29/2008 4:55:52 PM
RE: Changing images through event Posted by Rabih Tawil @ 12/29/2008 5:06:40 PM
RE: Changing images through event Posted by Yousfi Benameur @ 12/29/2008 10:50:43 PM
RE: Changing images through event Posted by Rabih Tawil @ 12/30/2008 8:32:00 AM
RE: Changing images through event Posted by Bernard Bout @ 12/29/2008 6:09:36 PM