From: Mr. Magic on
I've got various file types (.pdf, .swf, .jpg, .html) that I need to display
to the user. After a timer fires, I need to fade the current file out and
fade in the next one.

Does anybody know of any libraries that will do this? I assume I'll have to
put the file viewer into some kind of container that will then handle the
transition.

TIA - Jeff.

From: Peter Duniho on
Mr. Magic wrote:
> I've got various file types (.pdf, .swf, .jpg, .html) that I need to
> display to the user. After a timer fires, I need to fade the current
> file out and fade in the next one.
>
> Does anybody know of any libraries that will do this? I assume I'll have
> to put the file viewer into some kind of container that will then handle
> the transition.

It depends on how you are displaying them. But it's relatively simple
to do in a Forms application by explicitly compositing your images with
alpha blending before displaying them (doing so iteratively, of course,
adjusting each image's alpha for the composition to cause the fade effect).

And while I don't know the specifics, my understanding is that WPF has
an animation API that will do this even more automatically for you.

Pete
From: Mr. Magic on
Yes WPF will do it automatically but I need to do it in WinForms.

Jeff.

"Peter Duniho" <no.peted.spam(a)no.nwlink.spam.com> wrote in message
news:umK18GaALHA.4652(a)TK2MSFTNGP06.phx.gbl...
> Mr. Magic wrote:
>> I've got various file types (.pdf, .swf, .jpg, .html) that I need to
>> display to the user. After a timer fires, I need to fade the current file
>> out and fade in the next one.
>>
>> Does anybody know of any libraries that will do this? I assume I'll have
>> to put the file viewer into some kind of container that will then handle
>> the transition.
>
> It depends on how you are displaying them. But it's relatively simple to
> do in a Forms application by explicitly compositing your images with alpha
> blending before displaying them (doing so iteratively, of course,
> adjusting each image's alpha for the composition to cause the fade
> effect).
>
> And while I don't know the specifics, my understanding is that WPF has an
> animation API that will do this even more automatically for you.
>
> Pete

From: Jackie on
On 6/1/2010 20:08, Mr. Magic wrote:
> Yes WPF will do it automatically but I need to do it in WinForms.
>
> Jeff.
>
> "Peter Duniho" <no.peted.spam(a)no.nwlink.spam.com> wrote in message
> news:umK18GaALHA.4652(a)TK2MSFTNGP06.phx.gbl...
>> Mr. Magic wrote:
>>> I've got various file types (.pdf, .swf, .jpg, .html) that I need to
>>> display to the user. After a timer fires, I need to fade the current
>>> file out and fade in the next one.
>>>
>>> Does anybody know of any libraries that will do this? I assume I'll
>>> have to put the file viewer into some kind of container that will
>>> then handle the transition.
>>
>> It depends on how you are displaying them. But it's relatively simple
>> to do in a Forms application by explicitly compositing your images
>> with alpha blending before displaying them (doing so iteratively, of
>> course, adjusting each image's alpha for the composition to cause the
>> fade effect).
>>
>> And while I don't know the specifics, my understanding is that WPF has
>> an animation API that will do this even more automatically for you.
>>
>> Pete
>

If you want semi-transparency, you'll need to look at "layered windows":
http://msdn.microsoft.com/en-us/library/ms997507.aspx
There's also an example function there called FadeRect at the bottom.
However, this only works for top-level windows (not child windows, the
controls you have on your window).
If you can somehow put the controls you want on a new layered window and
position it on your main window, you can apply semi-transparency on the it.
From: Matt on
On Jun 1, 12:08 pm, "Mr. Magic" <Muf...(a)NoWhere.Com> wrote:
> Yes WPF will do it automatically but I need to do it in WinForms.
>
> Jeff.

Check out codeproject.com, and enter "fade image" into the search box.
I found several, not sure which one is most appropriate for your use.

Matt

>
> "Peter Duniho" <no.peted.s...(a)no.nwlink.spam.com> wrote in message
>
> news:umK18GaALHA.4652(a)TK2MSFTNGP06.phx.gbl...
>
>
>
> > Mr. Magic wrote:
> >> I've got various file types (.pdf, .swf, .jpg, .html) that I need to
> >> display to the user. After a timer fires, I need to fade the current file
> >> out and fade in the next one.
>
> >> Does anybody know of any libraries that will do this? I assume I'll have
> >> to put the file viewer into some kind of container that will then handle
> >> the transition.
>
> > It depends on how you are displaying them.  But it's relatively simple to
> > do in a Forms application by explicitly compositing your images with alpha
> > blending before displaying them (doing so iteratively, of course,
> > adjusting each image's alpha for the composition to cause the fade
> > effect).
>
> > And while I don't know the specifics, my understanding is that WPF has an
> > animation API that will do this even more automatically for you.
>
> > Pete- Hide quoted text -
>
> - Show quoted text -

 | 
Pages: 1
Prev: Unhandled Exceptions
Next: C# objects