I want to write a program in C language (in graphics mode). As an output that gives a rectangular box %26amp; this box must be containing two fields ‘Name:’ %26amp; ‘ID:’ so its enable me to give my name %26amp; id on this field. I know that after running program cursor is blink top of the windows but I want to blink it inside the rectangular box. So please help me to write this code.
I want to write a program in C language?
Does "in graphics mode" mean using the windows gui or in a console app using graphic characters?
I assume you mean a console app because the gui would automatically give you this stuff.
You need to write it using a cursor control library or perhaps if it's simple enough, just know the ascii terminal control codes. Search the web for ASCII/VT100 cursor control commands (I've listed a couple of them) and then write your output using those escape sequences.
For example, you output routines would do the following:
1) Clear the display
2) Write a line at position x,y
3) write characters down the sides of the box
4) write the bottom line
5) write the prompts at specific positions
Then your input routine would
1) place the cursor at the beginning of the name entry and accept x characters
2) Validate data and display message a x,y if needed
3) Place the cursor at beginning of ID entry
4) validate and write message as needed.
I've done something similar, although not in C, but the concept is the same.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment