AutoHotkey Community

It is currently May 27th, 2012, 6:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: November 3rd, 2010, 10:39 am 
Offline

Joined: January 7th, 2007, 1:43 pm
Posts: 107
Can I use an AHK message or order to easily change the Win7 desktop settting by 'personalize'->'desktop background'->'picture position'from 'tile' or other to 'stretch' mode?
I use dreamsence now,the text under the wmv seems unreadable.I should change the setting everytime when I start the Windows.
It's not an urgent matter.Only to discuss now.Thank you. :roll:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2010, 4:38 pm 
Offline

Joined: February 29th, 2008, 8:36 pm
Posts: 901
Location: Vault 7
Probably a window message can do that (SendMessage). Possibly SystemParametersInfo, though it is probably worth checking the messages yourself with Winspector Spy. I got SystemParametersInfo to change the background in this thread: Refresh desktop after registry change win7 [UNSOLVED]

_________________
ImageDebugging,Container,FileContainer,Object Preferences,ShellFileOperation


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 4th, 2010, 8:57 am 
Offline

Joined: January 7th, 2007, 1:43 pm
Posts: 107
Rapte_Of_Suzaku wrote:
Probably a window message can do that (SendMessage). Possibly SystemParametersInfo, though it is probably worth checking the messages yourself with Winspector Spy. I got SystemParametersInfo to change the background in this thread: Refresh desktop after registry change win7 [UNSOLVED]

Thank you for your help.
I think it's too difficult for me to do.I'll give up. :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 4th, 2010, 3:30 pm 
Offline

Joined: February 29th, 2008, 8:36 pm
Posts: 901
Location: Vault 7
I guess an easier way would be to send keystrokes and such. This should launch the control panel page where you can change from tile stretch etc. But it is rather kludgy like that.
Code:
Run, control desk.cpl`,`,@desktop


I'll post back if I ever figure out the messages method.

_________________
ImageDebugging,Container,FileContainer,Object Preferences,ShellFileOperation


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 6th, 2010, 11:25 am 
Offline

Joined: January 7th, 2007, 1:43 pm
Posts: 107
Rapte_Of_Suzaku wrote:
I guess an easier way would be to send keystrokes and such. This should launch the control panel page where you can change from tile stretch etc. But it is rather kludgy like that.
Code:
Run, control desk.cpl`,`,@desktop


I'll post back if I ever figure out the messages method.

Very very good!!
Thank you very much whether has a easy way or not. :mrgreen:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 6th, 2010, 2:55 pm 
Offline

Joined: February 29th, 2008, 8:36 pm
Posts: 901
Location: Vault 7
Try this:
Code:
style := "Fit"
tile := false
;===========================================================================================
;===========================================================================================
if      (style="Center")
   style := 0
else if (style="Stretch")
   style := 2
else if (style="Fit")
   style := 6
else if (style="Fill")
   style := 10


RegWrite, REG_SZ, HKEY_CURRENT_USER, Control Panel\Desktop, WallpaperStyle, % style*!tile
RegWrite, REG_SZ, HKEY_CURRENT_USER, Control Panel\Desktop, TileWallpaper, %tile%

len := 256
fWinIni := (SPIF_UPDATEINIFILE := 0x1) | (SPIF_SENDCHANGE := 0x2)
VarSetCapacity(pvParam,len)
DllCall("SystemParametersInfo"   , uint, uiAction   := SPI_GETDESKWALLPAPER := 0x0073
                        , uint, uiParam      := 256
                        , uint, &pvParam
                        , uint, fWinIni)
DllCall("SystemParametersInfo"   , uint, uiAction   := SPI_SETDESKWALLPAPER := 0x0014
                        , uint, uiParam      := 0
                        , uint, &pvParam
                        , uint, fWinIni)
;MsgBox %ErrorLevel%-%A_LastError%

_________________
ImageDebugging,Container,FileContainer,Object Preferences,ShellFileOperation


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google Feedfetcher, HotkeyStick, Wicked and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group