yes you can, in my experience the easiest way is to create the gui with +AlwaysOnTop, and show the Gui with NA (not-activated), thereby not disabling the screensaver
there is a caveat though, some screen savers will not allow it, or they put themselves back on top when refreshing, or something... picture slideshow in XP works fine, picture slideshow from vista won't (two different screen savers, the XP mypicss.scr running in vista also works fine but something about the new slideshow scr in vista doesnt allow my gui to be shown)
below is an excerpt of my app:
Code:
RegRead, Temp, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveActive
If !Temp ;=== this section reads the windows screen saver settings ===
IdleTime = 60
Else
RegRead, IdleTime, HKEY_CURRENT_USER, Control Panel\Desktop, ScreenSaveTimeout
Code:
If DetailsIdle ;=== this section checks idleness
{
If (A_TimeIdle > (IdleTime+5)*1000)
{ ;=== better detection thru sc_screensave???
If Details
{
WinMove, Details, , DetailsX += IdleXDir , DetailsY += IdleYDir
If DetailsX < -16
IdleXDir := Abs(IdleXDir)
Else If DetailsX > % Monitor2Right - DetailsWidth + 16
IdleXDir := - Abs(IdleXDir)
If DetailsY < -8
IdleYDir := Abs(IdleYDir)
Else If DetailsY > % A_ScreenHeight - DetailsHeight + 8
IdleYDir := - Abs(IdleYDir)
}
Else
{
DetailsTemp := True
GoSub, DetailsCreate
}
}
Else
If ((DetailsTemp) || (A_TimeIdle > (IdleTime+0) * 1000))
GoSub, DetailsClose
}
Code:
;=== and this section is part of the gui creation, which puts it on top
DetailsCreate:
Critical
SetBatchLines, -1
Gui, 10:Destroy
Gui, 10:-ToolWindow +AlwaysOnTop -Caption -Border +LabelDetails
Gui 10:+LastFound
Gui, 10:Color, Black
1stXPic = 0
1stXLabel = 0
LabelXPic = 0
DetailsXSpacing = 192
DetailsHeight = 830
HistorySize = 128
YSpacing = 42
MainY = 42
LastY = 82
JobY = 737
JobLength = 18
JobSpacing = 28
TimeY = 180
FontSize = 20
BigFont = 78
MedFont = 32
1st1stYPic = 608
1st1stYLabel = 693
If (DetailsXSpacing > (A_ScreenWidth / Machine0) || (DetailsHeight > A_ScreenHeight))
{
DetailsXSpacing = 128
DetailsHeight = 600
HistorySize = 64
YSpacing = 30
MainY = 33
LastY = 62
JobY = 522
JobLength = 14
JobSpacing = 23
TimeY = 122
FontSize = 16
BigFont = 48
MedFont = 22
1st1stYPic = 457
1st1stYLabel = 490
}
If DetailsXSpacing > % A_ScreenWidth / Machine0
{
DetailsXSpacing = 96
DetailsHeight = 568
HistorySize = 64
YSpacing = 30
MainY = 33
LastY = 52
JobY = 490
JobLength = 10
JobSpacing = 23
TimeY = 98
FontSize = 16
BigFont = 36
MedFont = 18
1st1stYPic = 425
1st1stYLabel = 458
}
If DetailsXSpacing > % A_ScreenWidth / Machine0
{
DetailsXSpacing = 64
DetailsHeight = 378
HistorySize = 32
YSpacing = 20
MainY = 18
LastY = 32
JobY = 325
JobLength = 8
JobSpacing = 15
TimeY = 63
FontSize = 10
BigFont = 24
MedFont = 12
1st1stYPic = 290
1st1stYLabel = 300
}
SmallXPic := (DetailsXSpacing - HistorySize) / 2
DetailsWidth := DetailsXSpacing * Machine0
If DetailsX not between % -16 and % Monitor2Right - DetailsWidth + 16
DetailsX = 0
If DetailsY not between % -16 and % A_ScreenHeight - DetailsHeight + 16
DetailsY = 0
Loop % Machine0
{
M_Index := A_Index
1stYLabel := 1st1stYLabel
1stYPic := 1st1stYPic
JobYTemp := JobY
;This control is to refresh gui when OnMessage WM_ERASEBCKGND is captured
Gui, 10:Add, Picture, x%1stXPic% y0 w%DetailsXSpacing% h%DetailsHeight% GuiMove,
Loop % HistoryLength
{
H_Index := HistoryLength - A_Index + 1
Gui, 10:Add, Picture, x%SmallXPic% y%1stYPic% w%HistorySize% h%HistorySize% vMachine%M_Index%Log%H_Index%Value3 GuiMove BackgroundTrans AltSubmit,
Gui, 10:Add, Text, x%1stXPic% y%1stYLabel% w%DetailsXSpacing% h%YSpacing% vMachine%M_Index%Log%H_Index%Value2 GuiMove BackgroundTrans Center,
1stYLabel -= %YSpacing%
1stYPic -= %YSpacing%
}
Gui, 10:Add, Picture, x%1stXPic% y%MainY% w%DetailsXSpacing% h%DetailsXSpacing% vMachineStatus%M_Index% GuiMove BackgroundTrans Center, % "Resources\Lights\" MachineStatus%M_Index% DetailsXSpacing ".png"
Gui, 10:Font, s%BigFont% w800 cBlack norm, Arial
Gui, 10:Add, Text, x%LabelXPic% y%LastY% w%DetailsXSpacing% vMachine%A_Index%DetailsLabel GuiMove BackgroundTrans Center,
LabelXPic += 2
TimeY += 2
Gui, 10:Font, s%MedFont% w600 cBlack norm, Arial
Gui, 10:Add, Text, x%LabelXPic% y%TimeY% w%DetailsXSpacing% GuiMove Center BackgroundTrans vMachineStatusTimeS%A_Index%, % LastMachineStatusTime%A_Index%
LabelXPic -= 2
TimeY -= 2
Gui, 10:Font , s%MedFont% w600 cWhite norm, Arial
Gui, 10:Add, Text, x%LabelXPic% y%TimeY% w%DetailsXSpacing% GuiMove Center BackgroundTrans vMachineStatusTime%A_Index%, % LastMachineStatusTime%A_Index%
StringSplit, MachineJob%A_Index%Job, MachineJob%A_Index%, / , %A_Space%%A_Tab%
StringLeft, MachineJob%A_Index%Job1, MachineJob%A_Index%Job1, % JobLength
StringLeft, MachineJob%A_Index%Job2, MachineJob%A_Index%Job3, % JobLength
StringLeft, MachineJob%A_Index%Job3, MachineJob%A_Index%Job4, % JobLength
Gui, 10:Font , s%FontSize% norm w500 cSilver, Arial Narrow
Gui, 10:Add, Text, x%LabelXPic% y%JobYTemp% w%DetailsXSpacing% -Wrap GuiMove Center BackgroundTrans vMachineJob%A_Index%, % MachineJob%A_Index%Job1
JobYTemp += JobSpacing
Gui, 10:Add, Text, x%LabelXPic% y%JobYTemp% w%DetailsXSpacing% -Wrap GuiMove Center BackgroundTrans vMachineJob2%A_Index%, % MachineJob%A_Index%Job2
JobYTemp += JobSpacing
Gui, 10:Add, Text, x%LabelXPic% y%JobYTemp% w%DetailsXSpacing% -Wrap GuiMove Center BackgroundTrans vMachineJob3%A_Index%, % MachineJob%A_Index%Job3
JobYTemp += JobSpacing
Gui, 10:Font, s%MedFont% cWhite norm w600, Arial Narrow
Gui, 10:Add, Text, x%LabelXPic% y0 w%DetailsXSpacing% GuiMove Center BackgroundTrans, % Machine%A_Index%
LabelXPic += %DetailsXSpacing%
1stXLabel += %DetailsXSpacing%
1stXPic += %DetailsXSpacing%
SmallXPic += %DetailsXSpacing%
; LastTempLeftTime%M_Index% = X
}
If !DetailsScreenShot
{
WinSet, Transparent, 223
WinSet, Region, 0-0 W%DetailsWidth% H%DetailsHeight% R20-20
}
If (!DetailsTemp || DetailsTemp = "")
{
Winset,AlwaysOnTop,Off
WinActivate
}
OnMessage(0x14, "")
Loop % Machine0
RefreshDetails(A_Index)
Gui, 10:Show, NA x%DetailsX% y%DetailsY% h%DetailsHeight% w%DetailsWidth%, Details
OnMessage(0x14, "WM_ERASEBKGND")
Details := True
Menu, Tray, Check, Details
;GoSub, UpdateDetailsTime
Return
hope this helps, i didnt really rewrite the code to be a tutorial but its pretty self explanatory, and the code is crappy otherwise, the whole script needs some major housecleaning... the two important things are
red
- gwarble