How to disable the screen-saver when running blitz

Blitz3D Forums/Blitz3D Programming/How to disable the screen-saver when running blitz

I found the password screen-saver will cause blitz3d game crash ,is there any way to disable the screen-saver using blitz3d programming?

Thanks.

Maybe you can use this VB code as a basis? It uses SystemParametersInfo, that could be called api_SystemParametersInfo in the user32.decls.
http://www.zarr.net/vb/download/codedetail.asp?code=210
I believe the IIf function is a sort of If statement and in google I found that SPI_SETSCREENSAVEACTIVE = 17

Thanks,I saw the codes ,but how to use them?

Here, I translated the routine:
;this program needs user32.decls in c:\program files\blitz3d\userlibs
;with the following function declaration:
;---------------
;api_SystemParametersInfo% (uAction%, uParam%, lpvParam*, fuWinIni%) : "SystemParametersInfoA"
;-------------

Graphics 320, 240, 0, 2
SetBuffer BackBuffer()

;disable screensaver
EnableScreenSaver(False)

;test if screensaver is active
;this assumes the delay is set to 1 minute
starttime = MilliSecs()
Repeat

	tme = MilliSecs() - starttime
	Cls
	Text 0, 0, 60 - (tme / 1000)
	Flip
	
Until KeyHit(1)

;enable screensaver
EnableScreenSaver(True)

End

Function EnableScreenSaver(lActiveFlag%)

  bank = CreateBank(255)
  value = api_SystemParametersInfo(17, lActiveFlag, bank, 0)
  FreeBank bank
  return value

End Function


This is very usefull, thanks a lot!