2

I'm writing a basic "hello world" program with Free Pascal Free Vision and I would like to remove the colors and to keep the program monochrome. Just black and white.

I know this was possible in the old Turbo Pascal days but I can't find any reference or sample code. I'm using the latest release of Free Pascal but an answer for Turbo Pascal also would help me.

Any idea?

EZM
  • 333
  • 1
  • 5
  • 4
    Yeah, it was so many years ago! :o) In the application's `Init` method just after `Inherited Init;` add `AppPalette := apMonochrome;` – Abelisto May 02 '17 at 07:36
  • That's worked. Thanks a lot!. – EZM May 02 '17 at 13:38
  • 2
    Sorry, my bad. The right way is to override `InitScreen` method and set `AppPalette` there. Good luck. – Abelisto May 02 '17 at 16:30
  • 1
    I didn't need override any method. Setting `AppPalette` to `apMonochrome` or `2` after of `TheApp.Init` works. I can even change the palette between color, black and white, and monochrome at runtime calling `AppPalette` with the proper value. Your answer showed me what function I should look for. Free Pascal defines the palettes in `src/packages/fv/src/app.pas`. – EZM May 02 '17 at 17:02

0 Answers0