Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

Pograma que se ejecuta como protector de pantalla

Estas en el tema de Pograma que se ejecuta como protector de pantalla en el foro de Visual Basic clásico en Foros del Web. Bueno, mi duda es como hacer eso en XP, ya que para Windows 98 el código seria: Dim ret As Integer Dim pOld As Boolean ...
  #1 (permalink)  
Antiguo 09/05/2005, 14:58
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Pregunta Pograma que se ejecuta como protector de pantalla

Bueno, mi duda es como hacer eso en XP, ya que para Windows 98 el código seria:
Dim ret As Integer
Dim pOld As Boolean
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
'Lógicamente declarando la API y la costante, pero eso no viene al caso

El cual funciona en Windows 98 pero no así en Windows XP, si tienen alguna forma de hacerlo, me gustaría saber.
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.
  #2 (permalink)  
Antiguo 09/05/2005, 16:04
 
Fecha de Ingreso: abril-2005
Mensajes: 3.083
Antigüedad: 19 años
Puntos: 17
El problema es que esa constante que usas no existe

SPI_SCREENSAVERRUNNING no aparece en la página http://msdn.microsoft.com/library/de...metersinfo.asp

Aún así, aparecen:

Cita:
Iniciado por Screen Saver
SPI_GETSCREENSAVEACTIVE Determines whether screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if screen saving is enabled, or FALSE otherwise.
SPI_GETSCREENSAVERRUNNING Determines whether a screen saver is currently running on the window station of the calling process. The pvParam parameter must point to a BOOL variable that receives TRUE if a screen saver is currently running, or FALSE otherwise. Note that only the interactive window station, WinSta0, can have a screen saver running.

Windows NT and Windows 95: This value is not supported.

SPI_GETSCREENSAVETIMEOUT Retrieves the screen saver time-out value, in seconds. The pvParam parameter must point to an integer variable that receives the value.
SPI_SETSCREENSAVEACTIVE Sets the state of the screen saver. The uiParam parameter specifies TRUE to activate screen saving, or FALSE to deactivate it.
SPI_SETSCREENSAVERRUNNING

Windows Me/98: Used internally; applications should not use this flag.

SPI_SETSCREENSAVETIMEOUT Sets the screen saver time-out value to the value of the uiParam parameter. This value is the amount of time, in seconds, that the system must be idle before the screen saver activates.
Mira a ver que valor has asignado a la constante...
  #3 (permalink)  
Antiguo 09/05/2005, 16:09
Avatar de David
Moderador
 
Fecha de Ingreso: abril-2005
Ubicación: In this planet
Mensajes: 15.720
Antigüedad: 19 años
Puntos: 839
Valor de la constante

El valor que le asigné fue 97:
Public Const SPI_SCREENSAVERRUNNING = 97

¿Tienes alguna idea de cómo podría ser? ...
__________________
Por favor, antes de preguntar, revisa la Guía para realizar preguntas.

Última edición por David; 09/05/2005 a las 16:18
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:29.