I need to create a dll using C++ for an animation. The animation is just moving a two rectangle bars. Could anyone please give me some idea how to do it in visual basic express?? Any website teaches for making dll? Any website talk about making graphic dll??
Instead of dll you can create a .exe file which will do the animation for you.
You can use sdl to create 2d graphics, that will be fine for you. Also, for this simple kind of problem you can solve it using win32 api's also. Though the performance will not be good but for a start it will be fine.
DirectX is meant as a 3D API in competition with OpenGL. Although I don't suggest either. Instead I suggest SFML or SDL which are both meant for and usable with 2D graphics. And I can't believe you would recommend GDI.
If your actually looking for a box (a cubic figure), then DirectX or OpenGL are great options. I'm personally against DirectX for being a rather selfish and greedy piece of software in the age of commercial software (although giving more documentation) so I will easily recommend OpenGL, a free and cross-platform low-level API*.
The reason you shouldn't use GDI should be in the Wiki: http://en.wikipedia.org/wiki/Graphics_Device_Interface
If not tell me and I'll find a different location for it. It should be in the top paragraph although I can't read it due to our school web filter.
*Although, the war of DX and OGL is really preference. DirectX has the use of high level functions. OpenGL is known for portability and flexibility. I'd say overall, their speed depends on your graphics cards. On Microsoft Windows, this usually isn't a problem and the overall performance is about the same. It also depends on how it was coded. If someone doesn't understand OpenGL and is outputting crap for code, then of course OpenGL is going to be slow. Same thing for DirectX although DirectX has a bit more documentation.