Hi
I'm writing a small application that will be used to welcome visitors to our company. The thought is to mount a TFT Screen on a wall and present our visitors on that screen.
But when no visitors are "available" is it not so nice to show a blank screen. So my intention is to find a nice screensaver that will be visible during times with no visitors and when visitors will be present is the "Welcome" page visible.
I have been able to get the screensaver to start if there is no visitors available, but how to i disabel the same without need to move the mouse or tap a key ?
Code used:
And this code to call the screensaver sub:
Whats happening is that i refresh the "Welcome" page with an intervall of 5 minutes, and looks on the "Repeater.item.count" value to determine wich parameter to send and even if there is items to show so will not the screensaver stop - and i can't figure out why
The code is VB and i use ASP.NET 2.0 for the application
I'm writing a small application that will be used to welcome visitors to our company. The thought is to mount a TFT Screen on a wall and present our visitors on that screen.
But when no visitors are "available" is it not so nice to show a blank screen. So my intention is to find a nice screensaver that will be visible during times with no visitors and when visitors will be present is the "Welcome" page visible.
I have been able to get the screensaver to start if there is no visitors available, but how to i disabel the same without need to move the mouse or tap a key ?
Code used:
Code:
Private Declare Function GetDesktopWindow Lib "user32" () As Integer
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As Integer) As Integer
Const WM_SYSCOMMAND As Integer = &H112
Const SC_SCREENSAVE As Integer = &HF140
Protected Sub StartScreenSaver(ByVal blnTrigger As Boolean)
' Calls for screensaver
Dim hWnd As Integer
hWnd = GetDesktopWindow()
SendMessage(hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, blnTrigger)
End Sub
Code:
Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
' Determins if screensaver or datagrid shall be presented
' Gerth Ericsson 2006-09-14
'
' ***********************************************************************
' *
' ***********************************************************************
If Repeater2.Items.Count = 0 Then
Call StartScreenSaver(False) ' Turns off screensaver as visitors exist to show.
Else
Call StartScreenSaver(True) ' Starts screensaver as there is no visitors to show.
End If
End Sub
Whats happening is that i refresh the "Welcome" page with an intervall of 5 minutes, and looks on the "Repeater.item.count" value to determine wich parameter to send and even if there is items to show so will not the screensaver stop - and i can't figure out why
The code is VB and i use ASP.NET 2.0 for the application