Results 1 to 4 of 4

Thread: Scrolling In C

  1. #1

    Default Scrolling In C


    Bro, how do you scroll up and down in C? By pressing the up and down arrow keys?

    Example: If ang output nimu lapas sa screen, I scroll down nimo

    Naa pa lain

    If naa kay menu, unsaon nimu pag select sa menu gamit sa arrow keys?

    example:

    1.Order Baboy
    2.Order Manok
    3.Order Kanding

    ang arrow key ra ang mupili ana nila



  2. #2

    Default Re: Scrolling In C

    bro, try using this code to get the ASCII code of those key you want:

    ch = getch();
    if(ch==0)
    ch =getch();


    printf("You pressed: [%i]\n",ch);
    you can also try that using the special keys using the arrow keys and the arrow keys/FUNCTION KEYS.

    if for example the left arrow key is equivalent to 45, then.

    if(ch == 45){
    /* do something for th left arrow key.*/
    }

  3. #3

    Default Re: Scrolling In C

    void DispMenu( int currentIndex )
    {
    unsigned char menu[3][20] ={"Baboy","Manok","Kanding"};
    clrscr(); //clear screen
    for(int x=0;x<3;x++)
    {
    printf("\n");
    if( x==currentIndex )
    printf(">>"); //arrow key
    printf("%d.%s ",x,menu[x] );
    }
    }

  4. #4

    Default Re: Scrolling In C

    Won't give you the code itself, aron makat-on will just give you the commands. Use the getch and movetext commands ot try gettext and puttext.

  5.    Advertisement

Similar Threads

 
  1. Replies: 2671
    Last Post: 10-29-2018, 11:39 PM
  2. GREAT DIVING SPOTS IN CEBU
    By Gypsy in forum Destinations
    Replies: 37
    Last Post: 10-22-2018, 10:29 AM
  3. How can you know if a guy/your BF is in love with you?
    By chaise18 in forum "Love is..."
    Replies: 110
    Last Post: 09-10-2015, 12:59 PM
  4. Do you believe in God? If so/if no, WHY?
    By n`gel in forum Spirituality & Occult - OLDER
    Replies: 1585
    Last Post: 07-31-2009, 04:33 PM
  5. Another Day in Paradise
    By n`gel in forum Music & Radio
    Replies: 20
    Last Post: 11-02-2005, 11:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top