Friday, September 5, 2014

How to make loading with Script C#

  No comments
this day, i will tell you script that changed into loading animation in visual studio 2012.
this is image of loading script
for (int i = 1; 1 <= 50; i++) {
                
                Console.SetCursorPosition(i, 5);
                Console.ForegroundColor = ConsoleColor.Red;
                Console.Write("░");
                Console.SetCursorPosition(20,5);
                Console.Write("{0}",i*(100/50)+"%");
                for (int t = 1; t < 3000000; t++) { }
                if (i == 50) {
                    Console.SetCursorPosition(20, 5);
                    Console.ForegroundColor = ConsoleColor.Yellow;
                    Console.Write("Mission Complete");
                    
                    Console.ReadLine();


change the red colored word to color that you want.
ok, leave a comment if you confusing !

No comments :

Post a Comment