Menu

BCQuery and Windows Forms

December 23, 2012 - Programming

Recently I posted about a new project I had come up with. The idea was to simplify basic animations within a Windows Forms Project.

Since then I had some success, but also quite a few issues, which have made me consider if the project is really feasible. Most of the issues revolve around drawing issues on separate threads and more prevalently the fact that Windows Forms- or rather, Windows Controls, since most Windows Forms Controls and components really boil down to some sort of Native Windows control- is not really that good for animation.

I was able to get it working quite well with a single group box and a button, and it resized amicably and looked quite good. However, once I complicated the scenario with a Paint event on the group box, the animation became jerky; additionally, the frame itself expanded, and then the button speedily followed. Arguably that could be called a “effect” but it was still undesirable. For the most part I’ve basically left the project to fester.

It is, however, worth noting that while I currently have it being used with Windows Forms, the way it is written does not mean I have to use it with Windows Forms- I could use it with anything with Public fields. I could use it with, say, WPF (though that would be somewhat pointless since WPF has it’s own Animation capabilities via Storyboarding), or even with things such as the various components of BASeBlock (Blocks, balls, etc), so I may yet find a use for it. It doesn’t, however, work well with Windows Forms. I will continue to experiment with it, but given what I understand of Window Styles and drawing capabilities- as well as threading limitations- I don’t think I’ll get something to work amicably.

Have something to say about this post? Comment!