Hi

I am using an instance of System.Drawing.Graphics class in my application
System.Drawing.Graphics gfxScreenshot;

I have used copyfromscreen method of this class.

gfxScreenshot.CopyFromScreen(System.Windows.Forms.Screen.PrimaryScreen.Bounds.X, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Y, 0, 0, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Size, System.Drawing.CopyPixelOperation.SourceCopy);

Its working fine locally but on remote machine its firing the error saying
System.ComponentModel.Win32Exception: The handle is invalid
Iam unable to trace out the error. Please help me if anyone know this. I have been crashing my head for 2 weeks.
Thanking you in advance
Regards
Anil

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.