This is what I have so far.
"TheMovieScreenShotTaker" is right in the middle of the screenshot, I used to find two way to work around that problem:
- Use a second screen and move my prgram to that extended screen, which is connecteced to my laptop(that works) and press the button from the second screen.
- Use AHK, but this did not work.
This is the relevant code I use:
System.Drawing.Rectangle bounds = Screen.GetBounds(System.Drawing.Point.Empty);
using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
{
using (Graphics g = Graphics.FromImage(bitmap))
{
g.CopyFromScreen(System.Drawing.Point.Empty, System.Drawing.Point.Empty, bounds.Size);
}
string zwischen = pathCreator(name).Equals("empty") ? "" : pathCreator(name);
if (zwischen.Equals("empty"))
{
MessageBox.Show("Fehler beim Erstellen des Ordners");
}
else
{
bitmap.Save(zwischen, ImageFormat.Jpeg);
}
}
I am using a backgroundworker to achive this.
May be I can exclude my program from the picture, like using layers(gimp, photoshop) and take everything exept my program for the screenshot ?!
And I thought of something like this: register keystrokes somewhere in the system like if you press strg+alt+delete
for the taskmanager
, and than if the keystrok event raises it will load my "TheMovieScreenShotTaker"(or at least it will load the assembly Assembly.LoadFile
and get+excecute my method, which will take the screenshot...
What do you think ?