Log in

View Full Version : My Quest! - a Wallpaper changer


Tirnaog
07-13-2007, 05:19 PM
Hello all,

I am looking for a app that with change the wallpaper on my PPC at set intervals. Very much like the MS Theme switcher of years ago.

I am running WM6. Do ye have any suggestions?

I tried to make one up myself. Had a nice little interface going. Listed all the tsk files on my PPC. Then ran into a road block the size of the China Wall! Seems changing the wallpaper in code on PPCs is a herendous secret MS is keep ing to them selves. I have looked, with google, all over the net for the last week. No bloody good. :(

I give up! It shouldn't be this hard to find docs explaining how to do this simple step.

So is there any apps out there that will do what MS Theme Switcher used to do?

Thanks
Deasun :?:

JonMisurda
07-13-2007, 06:59 PM
http://www.pocketpcdn.com/articles/changetodaytheme.html does this code work?

Jon

Tirnaog
07-13-2007, 08:49 PM
No doesn't seem to follow those registry keys.

Never get bored enough where you start one of these little projects!
It will drive ya nutters.

JonMisurda
07-13-2007, 09:14 PM
It seems like you set the Wall key to the filename minues the extension, maybe add a Skin string with no value to the Today key as well.

Then in \windows there are two scaled, reduced contrast versions of the image (for VGA):

stwater_640_480.jpg
stwater_480_640.jpg

Then broadcast the WM_INISETTINGSCHANGED message.

Jon

Tirnaog
07-13-2007, 09:28 PM
With the below i am getting an Unautherizedaccess error code on the setvalue line.

Code I am currently trying is; [VB.net code.]

Public Shared HWND_BROADCAST As IntPtr = IntPtr.op_Explicit(&HFFFF)
Public Const WM_WININICHANGE = &H1A
Public Shared SPI_SETDESKTOPWALLPAPER As Integer = 20

'<DllImport("coredll.dll")>
Private Declare Function SendMessage Lib "coredll.dll" Alias "SendMessageA"
(ByVal hWnd As IntPtr, ByVal Msg As System.Int32, ByVal wParam As
System.Int32, ByVal lParam As System.Int32)

private sub SetWallpaper()
Dim strWhoAmI As String = ""
Dim registryKey As Microsoft.Win32.RegistryKey
Dim strValues() As String
try
registryKey = Microsoft.Win32.Registry.CurrentUser '.CurrentUser '
.GetValue("HKEY_CURRENT_USER\ControlPanel\Home")
strValues =
registryKey.OpenSubKey("ControlPanel").OpenSubKey("DeskTop").GetValueNames()
strWhoAmI =
registryKey.OpenSubKey("ControlPanel").OpenSubKey("DeskTop").GetValue("Wallpaper").ToString
registryKey.OpenSubKey("ControlPanel").OpenSubKey("DeskTop").SetValue("Wallpaper", "\Windows\Guava bubbles.tsk")
strWhoAmI =
registryKey.OpenSubKey("ControlPanel").OpenSubKey("DeskTop").GetValue("Wallpaper").ToString
registryKey.Close()
SendMessage(HWND_BROADCAST, WM_WININICHANGE, SPI_SETDESKTOPWALLPAPER, 0)
Catch ex As Exception

End Try
End Sub