Create a full size blank screen to save burning the monitor

We have a need to display a weekly schedule for all staff to see and the monitor we want to use is an old Plasma TV. It displays the info adequately but is susceptible to image burn.

The form it displays needs to refresh every 10-30 seconds, which is done by updating a temporary table and re-displaying it. That refresh, coupled with the conditional formatting on the base form, causes the screen to flicker anyway so what I thought was I would put a black popup in the timer event so that it displays while the table is refreshed, thereby forming a quasi-screen saver. I've managed to do it but I don't know how to get the system to display the popup window larger than the full screen so as to cover everything.

I am open to suggestions.
Rob4077Asked:
Who is Participating?
 
chaauCommented:
OK, let's do it differently. We will use another API: SetWindowPos:

Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Private Declare Function GetSystemMetrics Lib "user32" _
 (ByVal nIndex As Long) As Long

Private Declare Sub SetWindowPos Lib "user32" (ByVal hWnd&, _
ByVal hWndInsertAfter&, _
ByVal X&, ByVal Y&, ByVal cX&, _
ByVal cY&, ByVal wFlags&)

Private Const HWND_TOP = 0 'Moves MS Access window to top of Z-order.
Private Const SWP_NOZORDER = &H4 'Ignores the hWndInsertAfter.


Private Sub Form_Load()
Dim h As Integer
Dim w As Integer
h = GetSystemMetrics(SM_CYSCREEN)
w = GetSystemMetrics(SM_CXSCREEN)

' do not use Me.Move
' Me.Move _
' Left:=-100, Top:=-100, Width:=w * 15, Height:=h * 15


SetWindowPos Me.hWnd, HWND_TOP, 0, 0, w, h, SWP_NOZORDER

End Sub

Open in new window

0
 
chaauCommented:
You can use the GetSystemMetrics API to get the width and height of the monitor. When you get these values you will update the size of the popup window with these values in the open event. Here is a VBA example for the GetSystemMetrics. The values you are interested in are: SM_CXSCREEN (0) and SM_CYSCREEN (1):

Private Const SM_CXSCREEN = 0
Private Const SM_CYSCREEN = 1
Private Declare Function GetSystemMetrics Lib "user32" _
 (ByVal nIndex As Long) As Long

Open in new window

0
 
Rob4077Author Commented:
Thanks Chaau. How do I then assign those values to the form size? Not sure what property to set to the size?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
chaauCommented:
Use this code in the popup form open event:
Dim h as Integer
Dim w as Integer
h = GetSystemMetrics(SM_CYSCREEN)
w = GetSystemMetrics(SM_CXSCREEN)

Me.Move _
Left:=0, Top:=0, Width:=w, Height:=h

Open in new window

0
 
Jeffrey CoachmanMIS LiasonCommented:
Is it an option to simply upgrade the Monitor to a newer LED screen?

We have an app that has been running for 5 years with no burn in...

Because blanking the screen will only delays the inevitable burn in anyway...
0
 
Rob4077Author Commented:
Hi Jeffrey, We need this to work for a while. I know it will eventually burn anyway and they'll have to then buy a decent screen. The only other thing I could think of is if there's an easy way to change the colour scheme every time it refreshes but I think that's even harder.

Chaau, Your code only opens a window that's about an 40mm by 20mm positioned under the tab names of the forms. What I need is full size of the whole monitor.
0
 
chaauCommented:
Sorry, forgot to convert to twips. multiply each value by 15:
Me.Move _
Left:=0, Top:=0, Width:=w*15, Height:=h*15

Open in new window

0
 
Rob4077Author Commented:
How do I work out how to get it to start at the top of the screen instead of under the tabs?
0
 
Rob4077Author Commented:
I changed the left and top values to -4000 and increased the multiplier from 15 to 17 and now it works fine. All I had to do was minimise the task bar at the bottom and it's doing what I need. Hopefully that will extend the life of the screen a little
0
 
chaauCommented:
In addition to that use BorderStyle=None
0
 
Rob4077Author Commented:
IS there a problem with the way I've handled it? Since it works that should be ok I would think????
0
 
chaauCommented:
Shouldn't be a problem unless you have multiple monitors. If you have a second monitor you will see the parts of your popup on the second monitor, as your popup is actually bigger than the monitor size.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.