WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Boxes Functions
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Mixed Screen Colours when running Winbatch Boxes Functions

Keywords:   boxes colors

Question:

I've written a number of small Winbatch programs, which make use of the box drawing features of Winbatch to make pretty-looking menus, ie:
        BoxNew(1,BoxSize1,1)
        BoxColor(1,"0,0,255",4)
These all contain several buttons on a fading-blue background. However, when I run the programs, the blue background initially appears, but is quickly replaced by lots of horrible horizontal stripes of different colours (greens, reds, black etc).

I don't have any idea what's causing these, but it only happens with Winbatch programs. I don't recall it happening when I was writing and testing the programs, so maybe it's something that has been introduced by a recent NT service pack or Winbatch update.

WinBatch just does this sometimes, most consistently under 95 where it occasionally leaves a fluorescent border around icons in the desktop. I've seen it do the horizontal bar bit on both 95 and NT, most notably on a fresh reboot (as opposed to just logging back in - my WB programs are a logon script), but it only changes the borders on 95. It does not seem tied to any of card, resolution, refresh etc. Under 95 the border change is presistent until you reset the Desktop appearance properties. then it disappears.

All systems involved have the following:

* NT 4.0 SP3 (US)
* Cirrus compatible display
* 800x600x256x72Hertz resolution
* All programs compiled using Winbatch compiler.

Answer:

Either a video driver bug or limitation. It's the fades doing it. Probably running in 256 color mode with arty wallpaper and other apps wanting to display colors. Windows gives up sometimes, especially if WinBatch is not the active application.

The problem revolves arount "Palette" based video modes (which nearly all 256 color modes are) where only 256 different colors can be displayed. Each color must be assigned to one of the 256 different slots.

The problem occurs when two different applications want to display something with different sets of 256 colors.

(P.S. Fades take a lot of color space - all those shades) A conflict occurs. The active application is supposed to win. The inactive application will look like mush. The whole process is kinda tricky. We think we have it right. But it is a co-operative effort amongst the applications, windows, and video drivers to make it work.


Article ID:   W12764
Filename:   Mixed Screen Colors with Boxes Functions.txt
File Created: 1999:04:15:16:49:28
Last Updated: 1999:04:15:16:49:28