If you have 32bit Vista, could you test it on that and see if it's the same? All is fine on XP. I doubt that it's a bug in PureBasic but it could be a compatibility issue of 64bit Windows running 32bit software, or possibly a bug in Vista. I just don't know, but it would be helpful to know if 32bit Vista did the same.
Here is a small code to test with, it just displays a visual feedback to show the screen is alive. If the screen gets killed it will stop.
Code: Select all
OpenWindow(0,0,0,128,128,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget)
InitSprite() : OpenWindowedScreen(WindowID(0),0,0,128,128,0,0,0)
t=ElapsedMilliseconds()
Repeat
If c : ClearScreen(#Gray) : Else : ClearScreen(#Black) : EndIf
If ElapsedMilliseconds()-t >= 300 : c=1-c : t=ElapsedMilliseconds() : EndIf
FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow



