This code does the screen scraping and copies the part of the screen and displays it in another location of the form, This code may be used to display a screen inside a button, textbox or any control.
This code sample captures the screen from a specified location and displays in a button control.
Graphics g = this.CreateGraphics(); g.CopyFromScreen(0, 100, 0, 200, new Size(650, 150), CopyPixelOperation.SourceCopy);
// To place the screen inside a button, just use the below code.
Graphics g = button1.CreateGraphics(); g.CopyFromScreen(0, 100, 0, 200, new Size(650, 150), CopyPixelOperation.SourceCopy);
|
No responses found. Be the first to respond and make money from revenue sharing program.
|