3

For couple of hobby projects of mine, I've been performing form transitions (fade-in/out, slide-left/right) using timer control, and I know its not the right way to do it. Using timer has its own disadvantages as it is a CPU hog if logic is complex and also, transitions are not smooth. So, I'm wondering how can I perform form transitions without using any timers and just by using native Windows API or any third-party library. I came across with FlowFX but found that it is limited only to .NET Compact framework.

Thanks...

Kushal
  • 3,112
  • 10
  • 50
  • 79
  • Must you use winforms? WPF makes those sorts of things easier, although it has a bit of a learning curve. – Chris Dunaway Jun 09 '11 at 13:22
  • Chris Dunaway: Planning to move to WPF but the current app I'm working on is small such that using WPF in there might make it bloated. – Kushal Jun 09 '11 at 16:56

1 Answers1

1

We don't know what your timer handler is doing without a code sample, but using a timer to do animations is an acceptable method.

Here is another SO question and answer that might show you a better way of coding your timer handler.

The "not smooth" part could perhaps be overcome using double-buffering.

Community
  • 1
  • 1
msergeant
  • 4,771
  • 3
  • 25
  • 26
  • I thought GDI+ has animation capabilities but I haven't explored it well. Anyways thanks for that "double-buffer" hint, was totally unaware of that, I'm a newbie in .NET :-) – Kushal Jun 09 '11 at 17:01