Problems with windows lock and loadimage

BlitzMax Forums/BlitzMax Programming/Problems with windows lock and loadimage

Graphics (800,600,0,0)

Repeat
Until KeyHit(KEY_ESCAPE)

Global i:Int
Global image:timage
Repeat
i:+1
Print i
image=LoadImage("image.png")
Until i>10000



Repeat

Cls
DrawImage(image,10,10)
Flip

Until KeyHit(KEY_ESCAPE)

If you are in windows vista press the windows key and L during the second repeat iand the game will crash. How can i fix this? :(