By: auctionsjeff (offline) Friday, March 02 2012 @ 10:00 AM EST (Read 3368 times)
I also wrote a dimming program, but it wasn't as fancy as a screen saver. It just checked system idle time until it was X, and then dimmed all the screens slowly (in stages), as a warning that your PC was about to lock.
Here is the code that I used to dim ALL screens no matter what: (couldn't get a for each to work due to a technicality)
PHP Formatted Code
Dim MinX As Int16
Dim MaxX As Int16
Dim MinY As Int16
Dim MaxY As Int16
For i = 0 To Screen.AllScreens.Count - 1
If .Location.X < MinX Then MinX = .Location.X
If .Location.X + .Width > MaxX Then MaxX = .Location.X + .Width
If .Location.Y < MinY Then MinY = .Location.Y
If .Location.Y + .Height > MaxY Then MaxY = .Location.Y + .Height
Debug.Print("Total Area: " & MinX & ", " & MinY & " to " & MaxX & ", " & MaxY)
Me.Left = MinX
Me.Top = MinY
Me.Width = MaxX - MinX
Me.Height = MaxY - MinY
Me.Visible = False
I also attached a screenshot so you could see what I meant.
By: Admin (offline) Thursday, March 29 2012 @ 11:27 AM EDT
Interesting. I took a look at the attached image. It might be because your primary screen (with the task bar) is in the middle. It's possible the code I've written assumes that the primary screen is the first or maybe the left-most screen. I'll have to revisit it. Unfortunately, I don't have more than one monitor nor a video card with more than one display output. The best I can do is connect my laptop to a monitor and get two screens.
Thanks for the code as well. I'll put this issue on the known issues list and will keep the code in mind when I am able to look at it.