Paul Moore wrote: > What I want to achieve is client-area transparency for a window - > essentially, make the client area transparent, without the window > border, title bar, etc being transparent. I'm aware of layered windows > and alpha blending - but this affects the window border as well as the > client area, so it's not what I'm after. > Can't help here, I'm afraid, except to say that if you can spot an opensource project already doing what you want, might be worth going through their code to see how they do it. (Although it might be mired deep in wx / Qt / whatever). Likely candidates are the IM/email clients which seem to use such effects. > On a slightly related note, I know I can use SystemParametersInfo with > SPI_GETDESKWALLPAPER to get the filename of the bmp file being used as > the desktop wallpaper - but can I get the method that bitmap is used > (stretch, center or tile)? I want to replicate (part of) the desktop > in a window, and without that information, I'm a bit stuck! > This one I can help with, at least from the WMI direction (!). You can interrogate the Win32_Desktop classes for that information. The complication is that WMI doesn't know which user's desktop you want, since it's running as a service not as a user (if you see what I mean). In any case, here's the starting point; I really must find a more elegant way to handle associators.
<code> import wmi import win32api c = wmi.WMI () for this_machine in c.Win32_ComputerSystem (): for user in this_machine.associators (wmi_result_class="Win32_UserAccount"): if user.Name == win32api.GetUserName (): for desktop in user.associators (wmi_result_class="Win32_Desktop"): print desktop.Wallpaper, desktop.WallpaperStretched, desktop.WallpaperTiled </code> Obviously you could also do it this way: <code> import getpass import socket hostname = socket.gethostname () username = getpass.getuser () desktopname = "%s\\%s" % (hostname, username) for desktop in c.Win32_Desktop (Name=desktopname): print desktop.Wallpaper # etc. </code> Chances are there's a more straightforward win32api-ish way of doing this, but this approach certainly works. TJG _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32