Discussion:
keypress in graphics
(too old to reply)
Jim
2013-12-11 13:54:52 UTC
Permalink
Hi,

I am trying to use getkey or keypressed in grahpics mode using Lazarus

I used to be able to do this in Borland Pascal 7 (DOS)

I cannot remember how I did it! but I may have used a bit of assembler. I think there is an easier way, possibly by using separate screen sections, Again, I do not know how to do it.

Best wishes,
Marco van de Voort
2013-12-11 15:15:40 UTC
Permalink
Post by Jim
I am trying to use getkey or keypressed in grahpics mode using Lazarus
In Graphics mode (unit (win)graph), or in GUI mode (Lazarus LCL).

If the first, use unit wincrt.

If the second, you can't use unit Crt, since
you have no console, and must use Windows/LCL keyevents for that.
Jim
2013-12-11 18:41:14 UTC
Permalink
Post by Jim
Hi,
I am trying to use getkey or keypressed in grahpics mode using Lazarus
I used to be able to do this in Borland Pascal 7 (DOS)
I cannot remember how I did it! but I may have used a bit of assembler. I think there is an easier way, possibly by using separate screen sections, Again, I do not know how to do it.
Best wishes,
Thanks Marco,

One point, although I am using Lazarus as the IDE, in Windows 7, I believe the code is being executed in a dos window, e.g. I only have 15 colours.

Best wishes
Jim
Jim
2013-12-13 19:49:11 UTC
Permalink
Post by Jim
Hi,
I am trying to use getkey or keypressed in grahpics mode using Lazarus
I used to be able to do this in Borland Pascal 7 (DOS)
I cannot remember how I did it! but I may have used a bit of assembler. I think there is an easier way, possibly by using separate screen sections, Again, I do not know how to do it.
Best wishes,
Can anyone direct me to a Dos pascal graphics tutorial that is fairly thorough, like how to create more than one view, DOS and graphics That may help sole this problem

I copied code from one tutorial that should have done what I needed but it did NOT work, i.e. a ReadLn was ignored.


This group is not so active as I remember, anyone recommend a more appropriate group/forum


Jim

Loading...