Solved

Cursor Box in the output screen!

Posted on 1999-01-14
5
194 Views
Last Modified: 2010-04-16
I want to be able to draw a cursor box in the output screen and then be able to move the cursor about(using arrow keys) without deleting the output text. I want to incorporate this in something big I want to develop.
0
Comment
Question by:zebe73
5 Comments
 
LVL 1

Accepted Solution

by:
eviltekk earned 10 total points
ID: 1216912
Use These Procedures:
---------------------------------------------------------
Var VirtualScreen : Array [1..4000] of Char;

Procedure SaveScreen;
Begin
Move(Ptr($B800,0)^,VirtualScreen,4000);
End;


Procedure RestoreScreen;
Begin
Move(VirtualScreen,Ptr($B800,0)^,4000);
End;
----------------------------------------------


Just Make Call to SAVESCREEN before drawing the box, and RESTORESCREEN before each time you move it or delete it.
(RESTORESCREEN will delete the box; you'll need to re-write it -it can be done through the same way. if you want to know how, comment me.


0
 
LVL 7

Expert Comment

by:Inteqam
ID: 1216913
?
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1216914
To create a cursor that looks like a box you should use assembler, and than the other pat is easy,, I can give you some source codes if you need...
0
 

Expert Comment

by:thunderchopper
ID: 1216915
Hi,
this sounds like a textmode thing to me ...
In textmode, the screenbuffer is located at [b800:0000]. From this address onwards, the screen is represented line by line, 2 bytes per character. The first byte is the ascii code of the character, the second its color attribute. You can change the color to anything you like without affecting the actual text.

eg.

Procedure SetColor(x,y:word;color:byte);
begin
   Mem[$b800:x+y*80+1]:=color;
end;

so the steps in your prog would be :

- store color at cursor position
- set cursor
- wait for keyboard input
- restore old color at cursor position
- store old color at new cursor position
- set cursor at new position


If you have any queries feel free to mail me at thunderchopper@hotmail.com
0
 

Expert Comment

by:onalenna
ID: 1216916
Zebe73,

I recommend that you use ASSEMBLER.Remember the cursor moving programs
we used to write, way back(le ka ngwaga mongwe tota!!)?.If you can use the ideas
from those programs then i think you will get somewhere. Besides it's fun programming
in assembler,so give it your best shot!!!!!!!!


0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
qrdesign delphi 5 pdf 5 444
How to slide a FMX tabcontrol tabitem up from the bottom 3 1,104
How to use WebDispatcher to retrieve data 3 400
Virtuailstring tree compare node issue 14 116
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now