DaProgrammer Posted October 5, 2007 Share Posted October 5, 2007 RegWrite('HKCU\Control Panel\Desktop', 'Wallpaper', 'reg_sz', $CurrentFile) DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $CurrentFile, "int", 0)oÝ÷ ÚÚ(½êÜ¢gçÚrÛajÛazÇ¥w¬¢yrç"z÷âë"ºÇ¶¬jëh×6 FileCopy($CurrentFile,@TempDir & "\999.jpg",9) ShellExecute(@ScriptDir & "\topng.exe", @TempDir & "\999.jpg bmp","","",@SW_HIDE) $CurrentFile = @TempDir & "\999.bmp" but i was wondering isn't there a way to display a wallpaper in jpg without converting on the fly with topng ? Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 5, 2007 Share Posted October 5, 2007 Well, you're doing it right, and I can understand why you wouldn't want to distribute your program with another embedded .exe.... My question is this... what does Windows use when you select a .jpg for display as a wallpaper? I know "ActiveDesktop" has to be enabled for it to work, but doesn't it convert the 'alien' formats into its 'native' bitmap? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
DaProgrammer Posted October 5, 2007 Author Share Posted October 5, 2007 Well, you're doing it right, and I can understand why you wouldn't want to distribute your program with another embedded .exe....My question is this... what does Windows use when you select a .jpg for display as a wallpaper? I know "ActiveDesktop" has to be enabled for it to work, but doesn't it convert the 'alien' formats into its 'native' bitmap?u struck my question exactly why can't i let windows convert it if necessary to bmp.why do i have to change it to bmp first, if windows changes a normally selected jpg on its own ? Link to comment Share on other sites More sharing options...
DaProgrammer Posted October 5, 2007 Author Share Posted October 5, 2007 from MSDN site SPI_SETDESKWALLPAPER Sets the desktop wallpaper. The value of the pvParam parameter determines the new wallpaper. To specify a wallpaper bitmap, set pvParam to point to a null-terminated string containing the full path to the bitmap file. Setting pvParam to "" removes the wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or NULL reverts to the default wallpaper. Starting with Windows Vista, pvParam can specify a .jpg file. Vista supports .jpg Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 5, 2007 Share Posted October 5, 2007 (edited) Personally, I'd rather support PNG. Sure, the file format's a little larger, but it doesn't have the "artifact" issues and it's still smaller than .bmp's RLE for complicated images. Speaking of images, your black and white pulsing avatar gives me a siezure. Edited October 5, 2007 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
DaProgrammer Posted October 5, 2007 Author Share Posted October 5, 2007 Managed to use GDI instead Link to topic in "Example Scripts" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now