How to flip your display AND change your desktop wallpaper

Situation:

You have a freakin' cool new TFT-display with pivot functionality. The Pivot-Pro®-Software, aka WinPortrait®, also works great. HOWEVER, it is annoying that when flipping your display to another orientation your desktop wallpaper looks ugly, or covers only a part of your display.

My way out: A bit too complicated, but free, and the only hack i could find in approximatly 2 hours (without having a clue of windows programming). It works with Windows XP, Service Pack 2. It should work for every Windows XP with the .NET Framework installed.

INSTALLATION NOTES can be found here. If your are interested in how it works: read on.


Here is how it works.

Step 1: Change the wallpaper.

You need to change your wallpaper. To avoid doing it by hand you can use WallPaperSwitch.exe wich is a compiled C#-10-liner:
using System;
using System.Runtime.InteropServices;
class MainClass
{
	[DllImport("user32.dll", CharSet=CharSet.Auto)]
	public static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni) ;
	public static void Main(string[] args)
	{
		SystemParametersInfo(20, 0, args[0],  0x1 | 0x2);
	}
}
Download the SharpDevelop-project here: WallPaperSwitch.zip.

This piece of junk allows you to change your wallpaper from commandline:
> WallPaperSwitch "C:\myfunkypics\myfunkydesktopwallpaper.bmp"
Great. Next step is to flip your display to the right orientation

Step 2: Flip your display

If you have installed Pivot-Pro®-Software, aka WinPortrait®, you find a application called "wpflip.exe" on your machine. This utility does exactly what we want.
wpflip -0
flips the display to 0 degrees.
wpflip -90
flips the display to 90 degrees.
wpflip -180
flips the display to guess it.

Putting it all together

Now we want to execute both steps with just a click. So lets create a (good old .BAT)-script in the folder where WallPaperSwitch.exe is:
WallPaperSwitch.exe "C:\myfunkypics\myfunkydesktopwallpaper.bmp"
insert-full-path-to-pivotsoftware-folder-here\wpflip -0
Save it as 0degrees.bat or so. You'll need such a file for every orientation. Ok, thats it. Try to execute the file, if the wallpaper changes and your display-orientation flips evrything is in perfect order. ALl you need to now is to link the .bat-files on your desktop.

Installation notes

WARNING: Making this work is not that easy. But if you, or a good friend with some advanced knowlegde of computers, read the instructions carefully it shouldn't be that hard.

Step 1: Download

Download this Zip-File:
pivotwallpaperhack.zip and extract it.

If you don't know how to do this: call your " good friend with some advanced knowlegde of computers".

Step 2: Edit the .bat-files

You'll find 2 files to .bat in the zipfile: up.bat and down.bat.

Open these files in your favorite text-editor (like Notepad). Here is the content of down.bat:
REM 1. STEP: Insert the FULL path to the wallpaper for orientation of 0 degrees as the frist (and only) parameter.
WallPaperSwitch.exe "C:\Temp\fractal1.bmp"

REM 2. STEP: Search the folder
 where your Pivot Software is installed. (look for "C:\Program Files\WinPortait" or similar). Then insert the full path to wpflip.exe below. Add "-0" (for zero degrees) as parameter.
C:\Programme\WinPortrait\wpflip -0
Now follow the instructions in the file. Do this for up.bat as well.

If you don't know how to do this: call your " good friend with some advanced knowlegde of computers".

Step 3: Check if the batch-files work

Execute up.bat and down.bat. If it works: grats. If not: go back to step 2.

If you don't know how to do this: call your " good friend with some advanced knowlegde of computers".

Step 4: Create links to the .bat-files...

.. on the desktop.

If you don't know how to do this: call your " good friend with some advanced knowlegde of computers".