Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flipping / Sliding Effect with Winforms

I am trying to make an Flipping / Sliding Effect with Winforms.

To be exact: a effect where the first Form slides/ is pushed out of the screen and the second one slides in.

After a lot of research I came to the conclusion that a Flipping effect is not working in Winforms.

I tried the following things for the sliding effect:

  1. Embedding winforms in Wpf Application - using Windowsformshost --> Windowsformshost doesn't support animation.

  2. Change Location of the Forms a. with an Timer b. with loop c. separate threads

    -->the form is flickering & does not look professional

  3. Screen capture - i.e. screenshots of the forms

    --> same Problem: flickering

  4. AnimateWindow Function (API)

    --> the API doesn't support threading --> sliding in AND out of both forms at the same time is not possible. --> same Problem: flickering

Additional Infos:

I use C# ,Visual Studio 2010 (Dot net Framework 4.0) 3rd party Controls - Telerik On my Form are Custom Controls (extended Telerik controls) I have set Doubblebuffered to True for the controls.

It would be really helpful if somebody could help/suggest to overcome this issue (winforms Flipping/Sliding Effect).

Regards, WickedSquall

like image 344
Wickedsquall Avatar asked Jul 30 '26 07:07

Wickedsquall


1 Answers

The best option would be

5. Switch to WPF. It runs on DirectX and you need that.

But I guess that's not an option. The most workable seems your option 3 , moving bitmaps. The flickering should be solvable with double-buffering etc.

like image 142
Henk Holterman Avatar answered Jul 31 '26 22:07

Henk Holterman