rushtheweb
asked on
Creating a circular progress bar...
I want to make a custom progress bar which would be almost a complete circle.
An example in c++ is http://www.codeguru.com/cpp/misc/misc/system/article.php/c11679/
Is this easily doable with c#?
Thanks
An example in c++ is http://www.codeguru.com/cpp/misc/misc/system/article.php/c11679/
Is this easily doable with c#?
Thanks
Windows hooks are not part of .NET. This can be done in C#, but 99% of code must be written using API PInvoke code. I think it can be done better in C++/CLI, which allows direct API calls without PInvoke.
Actually, you can write C++/CLI Class Library, add files MousePrg.cpp, MousePrg.h, MousePrgVars.h, and MousePrgHook.h to it and use CMousePrg class directly from C++/CLI code.
ASKER
Im not looking to have it recreated like that example (mouse following and what not); Im just hoping to make something similar to put on a form for not only a visual element but also as a space saver. I appreciate your comments! :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome, ill give it a shot... can you tell me what to define pe as?
Thanks
Thanks
ASKER
Scratch that I wasnt paying attention! :)
ASKER
Awesome, it seems to be working. I will have to play with it and figure out how to do a border to make it look more like a progress bar and change the direction to counter clockwise and then I think its perfect! If you have any more tips toward my goal I would really appreciate them. :)
To go counterclockwise, just use a negative 4th parameter to DrawArc:
g.DrawArc(pen,rec,startAng le,-360.0f * percent);
g.DrawArc(pen,rec,startAng