Unusual XP Desktop WAS: UDF _GetTrayBarPos( ), Determine TrayBar Position
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
More serious problem is with Desktop window. You can use the
following functions:
;Sets the transparency of the Desktop Window
Func DesktopTrans($Transparency)
Opt("WinTitleMatchMode", 4)
WinSetTrans('classname=Progman', '', $Transparency)
EndFunc
;Restore Desktop Window
Func DesktopRestore()
Opt("WinTitleMatchMode", 4)
WinSetTrans('classname=Progman', '', 255)
EndFunc
This script shows problems of Desktop restoring
$Transparency = 0
DesktopTrans($Transparency)
Sleep (2000)
DesktopRestore()
And this one shows unusual & strange Desktop of Windows XP:
$Transparency = 0
DesktopTrans($Transparency)
Sleep (2000)
;DesktopRestore()
These is a subject for Service Pack 3, I think.
;-)
Valery
--- In [email protected], "valery_vi" <shehrer1@...> wrote:
>
> BTW I have explored Shell Tray window and it's properties.
>
> The result is two tricky functions:
>
> ;Sets the transparency of the Shell Tray Window
> Func ShellTrayTrans($Transparency)
> Opt("WinTitleMatchMode", 4)
> WinActivate('classname=Shell_TrayWnd', '')
> WinSetTrans('classname=Shell_TrayWnd', '', $Transparency)
> EndFunc
>
> ;Restore Shell Tray Window
> Func ShellTrayRestore()
> Opt("WinTitleMatchMode", 4)
> WinActivate('classname=Progman', '')
> WinSetTrans('classname=Shell_TrayWnd', '', 255)
> EndFunc
>
> So if you will try following:
>
> $Transparency = 170
> ShellTrayTrans($Transparency)
> Sleep (2000)
> ShellTrayRestore()
>
> then Shell Tray window will be OK. But you can transform Shell Tray
> into hidden window, too:
>
> $Transparency = 0
> ShellTrayTrans($Transparency)
> Sleep (2000)
> ;ShellTrayRestore()
>
> without restoring it's default properties.
>
> Important note: Windows XP can't autorestore the main control
(Shell
> Tray window) of desktop! It's bad in many cases, I think.
>
> Valery
>
> --- In [email protected], "valery_vi" <shehrer1@> wrote:
> >
> > Someone (bugfix!) from AutoItScript wrote:
> > http://www.autoitscript.com/forum/index.php?showtopic=39076
> >
> > "..
> > In some cases you need the TrayBar position. I've made a solution
> for
> > this.
> > "
> >
> > His solution isn't valid in my case.
> > So I wrote other one. It can be called as ShellTrayPos():
> >
> > Msgbox(0,'', ShellTrayPos())
> >
> > ;Get type of Shell Tray Window position
> > Func ShellTrayPos()
> > Opt("WinTitleMatchMode", 4)
> > $ShellTrayPos = WinGetPos('classname=Shell_TrayWnd', '')
> > $Left = $ShellTrayPos[0]
> > $Top = $ShellTrayPos[1]
> > $Width = $ShellTrayPos[2]
> > $Height = $ShellTrayPos[3]
> > if $Left <= 0 then
> > if $Top <= 0 then
> > if $Width > $Height then
> > return 'Top'
> > else
> > return 'Left'
> > endif
> > else
> > return 'Bottom'
> > endif
> > else
> > return 'Right'
> > endif
> >
> > EndFunc
> >
> > It isn't symmetric like can be expected at first sight but it
works
> > for my hidden and left-side tray.
> >
> > Valery
> >
>