Board index » delphi » Can I use Graphics Mode in Turbo Vision?

Can I use Graphics Mode in Turbo Vision?

Dear readers,

Some time ago I made a nice Pascal program (TP7), that uses a fast and
simple assembler routine to scan the parallel port.
I use it to measure the revolutions of a large "flywheel" that is mounted in
an inertia dynojet.

The software works perfectly. The acquired data is base for some
calculations that result in a nice graph (revs - Kw) in graphics mode.

Now I want to make the User Interface (U.I.) a littkebit more sophisticated.
I want to use Turbovision. The U.I. is really a succes (of course) but so
far I have not been able to use the graphics mode needed to display my
graph; After a "closegraph" the GUI shows a black screen. It is still alive,
but the screen (menu + centre screen) needs to be redrawn.
How can I use the graphics mode in Turbo Vision?

Second question:
As a newcomer to Turbo vision I also find myself struggling to display data
in a window. Should be easy....
This is what I want (or something similar):

Open_window;
Repeat
  read_sensor;
  gotoxy(2,2);
  write(revolutions_per_minute);
until keypressed:
Close_Window;

What kind of code in Turbo Vision is needed to program this?
All information is very much appreciated.

Thanks,

Bas Bekema

 

Re:Can I use Graphics Mode in Turbo Vision?


Quote
b. bekema <b.bek...@hccnet.nl> wrote in message

news:a2cfo7$9rp$1@news.hccnet.nl...

Quote
> Now I want to make the User Interface (U.I.) a littkebit more sophisticated.
> I want to use Turbovision. The U.I. is really a succes (of course) but so
> far I have not been able to use the graphics mode needed to display my
> graph; After a "closegraph" the GUI shows a black screen. It is still alive,
> but the screen (menu + centre screen) needs to be redrawn.
> How can I use the graphics mode in Turbo Vision?

I assume you already know that you ~either~ have to be in TV-mode (text screen
mode) ~or~ you switch to graphics mode (and the Turbo Vision display
disappears of course).

If you want a pro-quality display, then you need a graphical implementation of
Turbo Vision, so that both your custom "rev counter" window and your normal
GUI elements can be displayed together. So you might want to take a look at my
Graphic Vision (see my sig), or some other "Graphical Turbo Vision".

Quote
> Open_window;
> Repeat
>   read_sensor;
>   gotoxy(2,2);
>   write(revolutions_per_minute);
> until keypressed:
> Close_Window;

You will have to "Think OOP". With TV (or GV).  You will need to design a
custom view that displays your data as you see appropriate. I suggest you
start by using a stock object, such as a TParamText, that displays formatted
text with variables, so it can be used to display a number. Then you will have
to link this display with your (dynamic) data.

It's not difficult once you've got the hang it. You might even end up with,
say an "analogue dial" rev counter once you get proficient.

--
Jay

Jason Burgon - Author of "Graphic Vision"  GUI for DOS/DPMI
=== Free LFN capable Dos/WinDos replacement and ===
=== New Graphic Vision  version 2.21 available from:  ===
http://www.jayman.demon.co.uk

Other Threads