2
Vote

Height, Width, Location (Single or Multiple Monitors) - Fix with Source & Compiled

description

So I ran into this project today and had to play around with it.
 
Ive hacked it to make it work with my setup. Ive got 2 monitors and the orignal location picked by the author was sort of useless for me. So I went ahead and hacked it a bit, hope you dont mind.
 
I added a few settings in app.config and added some code.
 
The source code as well as the compiled binary is attached for your review.
 
-- For those that dont care about the soruce code, download the file and look at the Todo\bin\Release folder. Inside it is where you'll find the files of interest.
 
Edit ToDo.exe.config and look at the four XML settings.
 
LocationX - Where to position the window, horizontal location.
LocationY - Where to position the window, vertical location
Height - height of the todo list window
Width - Width of the window.
 
So lets say you have two monitors, running at 1920x1200 each. And I want the todo list to be on my second monitor and to take up the whole monitor screen.
 
LocationX = 1921 (since the first monitor takes up the First 1920 pixels, 1921... will end up on the second monitor).
LocationY = 0 (I want the window to sit right at the top.
Width = 1920 (I want the ToDo list to take up the entire window)
Height = 1200 (same as above)
 
save the file and start your Todo List.. it should work.. i've had no problems.
 
Files modifed:
 
Settings (app.config)
Win32.cs - added MoveWindow()
Window1.xaml.cs - SetInBackground() to make use of Win32.MoveWindow()
 
And Im sure there's a better way of doing this, so for the time being, this seems to work.
 
Thanks again for the great piece of software and kudus for making it easy to get the code.
 
-- if you dont want this post here for some reason, feel free to delete.
 
-jsidhu

file attachments

comments