
I seem to be have a problem with the following code below i have checked it on PB 4.31 on Windows XP & PB 4.41 and Windows 7 and they are the same.
The program seems to flicker white for a few flips in windowed mode then goes black as expected, its the few flickers i cannot seem to understand why this is happening...
in full screen mode it is fine, any help please

it is more pronouced in debug mode.
Code: Select all
Version$="v1.2"
_Window=#True
If InitEngine3D()=0
MessageRequester("Error", "Failed to open 3D Engine", 0) : End
EndIf
If InitKeyboard()=0 Or InitSprite()=0
MessageRequester("Error", "Can't open DirectX 7 or Greater", 0) : End
EndIf
ExamineDesktops()
MonitorFrequency=DesktopFrequency(0)
If MonitorFrequency=0 : MessageRequester("Error", "Failed to open a 800*600 screen!",0) : End : EndIf
If _Window=#False
If OpenScreen(800,600,16,version$,#PB_Screen_WaitSynchronization,MonitorFrequency)
Else
MessageRequester("Error", "Failed to open a 800*600 16 bit screen",0)
EndIf
EndIf
If _Window=#True
OpenWindow(0,0,0,800,600,Version$,#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget)
If OpenWindowedScreen(WindowID(0),0,0,800,600,1,0,0,#PB_Screen_WaitSynchronization)
Else
MessageRequester("Error", "Failed to open a 800*600 32 bit screen",0)
EndIf
EndIf
Repeat
ExamineKeyboard()
FlipBuffers()
If _Window=#True
Repeat
Event=WindowEvent()
If Event=#PB_Event_CloseWindow : End : EndIf
Until Event=0
EndIf
Until KeyboardPushed(#PB_Key_Escape)
Kevin
