Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fadeout form

Status
Not open for further replies.

Koen Piller

Programmer
Jun 30, 2005
841
NL
Hi,
I have downloaded and studied (maybe not enough) the class "fadeform.vcx" to gradualy fade-in and fade-out a form. A nice effect. I would like to implent this however only the fade-out part. I dont seem to handle since when I start with full visible to down full invisible I get the effect of a complete black form which than gradualy changes from a see-thru effect into nothing. The starting off with black I would like to avoid, any idea which parameter to set to get the desired result?
Thanks for replying.
Jockey2
 
Hi Jockey,

Are you referring to my FadeForm class (the one at
If so, you should be able to achieve what you want simply by not call the FadeIn method. In other words, in the Init, comment out this line:

thisform.FadeIn

The rest of the class should work as before. If it doesn't, perhaps you could explain what you have already done to try to get it to work.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike,
Yes indeed it is your class. And somehow somewhere I dont seem to get it working without a starting flash of complete dark sreen. The initline ThisForm.FadeIn was commented out so the form appears with 100% opaque, clicking the button gives me a blackscreen for 0,5 sec than nicely grading out. Debugging shows it happens exactly on line of fadeout method :
SetLayeredWindowAttributes(ThisForm.hWnd, 0, lnTrans, 2)

however in DebugWindow only for a very short split second.
I realy would like to implent this class but obivoously not with a black screen as starter, do you have a solution?
Regards,
Jockey2

jockey.gif
 
Mike,

I'll wait for your solution. Thanks already.

Jockey2
 
Jockey,

Try starting lnTrans at a lower number. It seems to work if you set it to about 180.

In other words, change this line:

lnTrans = 255

to something like this:

lnTrans = 180

If you do, you might want to increase the Sleep() parameter, to compensate for the fact that there are fewer iterations of the loop.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,
lnTrans at 180 gives no significangt difference.
Even lnTrans = 100 still a black starter, admitted not so intense black, but unacceptable.
Could you explain what is going on?
F.Y.I. I am running on XP Home, will try this tom on other configurations also.
Regards,
Jockey2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top