Thread: cursor movement and appearance

  1. #1
    Registered User
    Join Date
    Nov 2002

    Question cursor movement and appearance

    Trying to write a game in C. Have to make the cursor move wherever I want on the dos prompt after I run the program. I want to use the regular arrow keys to control the move but don't know how!!!(
    I also wanted to make the cursor look like spinning by changing its appearance from _ \|/_ \... contineoulsy.
    Have no heck of a clue....

    Any help would be highly appreciated!

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Both your questions have been discussed a few times on here, try searching for a previous thread.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User datainjector's Avatar
    Join Date
    Mar 2002
    try the search for the board u will end up with a good result... There is not ansi function that check cursor movement for u ..that i know of ..and the spinning of the cursor is really easy

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    static void pause ( int ticks )
      clock_t end, current = clock();
      end = current + ticks;
      while ( current < end )
        current = clock();
    int main ( void )
      int i;
      char *ch[3] = {"\\", "|", "/"};
      while (1)
            for (i = 0; i <= 2; i++ ){
                printf("%s", ch[i] );
      return 0;
    "I wish i could wish my wishs away"

    "By indirections find directions out" -- William Shakespears

    "Do what thou wilt shall be the whole of the law" -- Crowley "THE BEAST 666"

    Mizra -> love = Death...
    RDB(Rocks yooo)..

    Are you ready for the Trix ???

  4. #4
    Registered User
    Join Date
    Nov 2002

    Talking Thankx

    Thankx a bunch for the prompt reply....

    Hope that will help me...
    I'll try it...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Icon appearance problem
    By axr0284 in forum Windows Programming
    Replies: 0
    Last Post: 04-06-2005, 10:50 AM
  2. Automatic appearance help.
    By staggy11 in forum C Programming
    Replies: 6
    Last Post: 03-05-2005, 10:27 AM
  3. Lame question on dialog controls appearance
    By Templario in forum Windows Programming
    Replies: 2
    Last Post: 03-18-2003, 08:22 PM
  4. cursor movement and appearance
    By beginner in forum Game Programming
    Replies: 1
    Last Post: 11-06-2002, 06:42 PM