I wrote a program using c# with form application, using clipboard and capture screen. This program running remote desktop (mstsc). But if I close remote desktop window (not disconnect only close window or minimize window) my program is stopping.
I didn't find any solution. Can you help me please
Error:stack trac location: System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize)
Error:message The handle is invalid