Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# Windows Forms screenshot

// doing a screenshot from control "panel2"
string filename = "временный файл.jpeg";
Bitmap printscreen = new Bitmap(panel2.Width - 5, panel2.Height - 5);
Graphics graphics = Graphics.FromImage(printscreen as System.Drawing.Image);
int top = this.Top + panel2.Top + 35;
int left = this.Left + panel2.Left + 10;
graphics.CopyFromScreen(left, top, 0, 0, printscreen.Size);
printscreen.Save(filename, System.Drawing.Imaging.ImageFormat.Jpeg);
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity predicts rigidbody position in x seconds 
Csharp :: check the request comes from which operating system used by user in asp net core 
Csharp :: wcf service dependency injection 
Csharp :: cache.TryGetValue in MemoryCache c# .net 
Csharp :: how to authorize token when consuming api in c# 
Csharp :: get first and last item list c# 
Csharp :: c# dubble comment 
Csharp :: belgium 251 PRG Prac 
Csharp :: c# int cast error 
Csharp :: convert array to datatable c# 
Csharp :: getcomponent rigidbody2d 
Csharp :: c# hashset 
Csharp :: integer to boolean conversion in unity C# 
Csharp :: extension of c sharp 
Csharp :: unity c# rate game 
Csharp :: linq where c# 
Csharp :: make sprite invisible unity 
Csharp :: why doesnt the if command work in C# 
Csharp :: Unity inverse kinematics nothing is happening 
Csharp :: c# reduce a collection to a string 
Csharp :: laravel get current url 
Html :: email regex html pattern 
Html :: jqury get selected option 
Html :: html input not editable 
Html :: remove html tags from string python 
Html :: target blanc 
Html :: how to link html pages in different folders 
Html :: laravel blade remove all html tags 
Html :: flex direction column bootstrap 4 
Html :: open new tab html 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =