background color 
Author Message
 background color

Hello! Does anybody know why the following routine works in 640X480X16
but it does not work in 800X600X256 made with the driver SVGA256.BGI
uploaded from Borland?

The routine wants to change the backgrund color from black to white and
the drowing color from white to black and vice-versa at every keypressed.
This is dome by changing the palette.

repeat
  ch:=readkey;
  if flag_colr=true then begin
    border(0);
    setBkColor(0);
    setPalette(15,63);
    flag_color:=false;
  end
  else begin
    border(63);
    setBkColor(15);
    SetPalette(15,0);
    flag_color:=true;
  end;
until ch=#27;



Sat, 31 Jul 1999 03:00:00 GMT  
 background color

Quote:

> Hello! Does anybody know why the following routine works in 640X480X16
> but it does not work in 800X600X256 made with the driver SVGA256.BGI
> uploaded from Borland?

> The routine wants to change the backgrund color from black to white and
> the drowing color from white to black and vice-versa at every keypressed.
> This is dome by changing the palette.

> repeat
>   ch:=readkey;
>   if flag_colr=true then begin

              ^^^  

Quote:
>     border(0);
>     setBkColor(0);
>     setPalette(15,63);
>     flag_color:=false;

^            ^^^

Quote:
>   end
>   else begin
>     border(63);
>     setBkColor(15);
>     SetPalette(15,0);
>     flag_color:=true;

             ^^^
Quote:
>   end;
> until ch=#27;



Sun, 01 Aug 1999 03:00:00 GMT  
 background color

You correctly pointed out an error. This was due to unintentional
backspace key depression. The corrected program don't work in 800X600X256
but works in 640X480X16!
Any other idea?

thanks in advance
Raimondo

Quote:
> > repeat
> >   ch:=readkey;
> >   if flag_colr=true then begin
>               ^^^  

> >     border(0);
> >     setBkColor(0);
> >     setPalette(15,63);
> >     flag_color:=false;
> ^            ^^^

> >   end
> >   else begin
> >     border(63);
> >     setBkColor(15);
> >     SetPalette(15,0);
> >     flag_color:=true;
>              ^^^

> >   end;
> > until ch=#27;



Sun, 01 Aug 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Windows Pascal 1.5 - Text color & Background color

2. Windows Pascal 1.5 - Text color & Background color

3. How to change background color in application?

4. How to change window background color?

5. Back again....more background colors??

6. High Intensity White Background Color?

7. High Intensity White Background Color?

8. Background color of selected lines in multiselect DBGrid

9. Text/Background Color- WIN1.5

10. How to use Yellow as Background color?

11. How to use Yellow as Background color?

12. Background color

 

 
Powered by phpBB® Forum Software