Canvas Problem

BlitzMax Forums/BlitzMax Beginners Area/Canvas Problem

cps(Posted 2016) [#1]
I've just come across a little problem when using canvas as below:

ActivateGadget W2Can1
SetGraphics CanvasGraphics(W2Can1)
SetMaskColor 100,0,0
Cls
Flip
CreateTimer 60' refresh rate for canvas flip/draw

Repeat' main loop
Delay 10
PollEvent

Select EventID()

Case EVENT_TIMERTICK
RedrawGadget(W2Can1)

Case EVENT_GADGETPAINT
SetGraphics CanvasGraphics(W2Can1)
Flip

End select

Forever

The problem is that I get a black screen on the canvas if the firewall kicks in when I'm running networked games over the internet, this only seems to occur when running under windows vista.
A redrawgadget command doesn't help. However I can use a 'draw all my game shapes function' then call the redrawgadget function.
Is there a get pixel function that I've missed ( IE if detect black pixel then initiate a compleat redraw of my canvas ) ?
Has any body else encountered this problem or has my method of using canvas let me down again ?
Many thanks for any feedback, have fun Cps


cps(Posted 2016) [#2]
Just found the thread 'Trying to get colour at a pixel location' which solves the problem of detecting a black pixel, hence I can rectify the display. But a way of avoiding the problem would be helpful. Have fun Cps