take screenshot in c#
C#
using System.Windows.Forms;
using Point = System.Drawing.Point;
using Rectangle = System.Drawing.Rectangle;
Rectangle bounds = Screen.GetBounds(Point.Empty);
using(Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
{
using(Graphics g = Graphics.FromImage(bitmap))
{
g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
}
// will save to working directory ( for C# WPF in VS 2019: C:\Users\{user}\source\repos\{project}\{project}\bin\Debug )
bitmap.Save("test.jpg", ImageFormat.Jpeg);
}
Also in C#:
- Title
- get variable from another script unity
- Category
- C#
- Title
- c# window instantly close
- Category
- C#
- Title
- unity transfoprm position y change
- Category
- C#
- Title
- c# get every point in a line in matrix
- Category
- C#
- Title
- comments unity c#
- Category
- C#
- Title
- C# colours
- Category
- C#
- Title
- c# creating exceptions
- Category
- C#
- Title
- countdown script unity
- Category
- C#
- Title
- html hidden text
- Category
- C#
- Title
- internal c#
- Category
- C#
- Title
- convert system.byte a string c#
- Category
- C#
- Title
- unity array of child objects
- Category
- C#
- Title
- what is a protected int c#
- Category
- C#
- Title
- initialize matrix c#
- Category
- C#
- Title
- change z value unity
- Category
- C#
- Title
- dynamic convert type c#
- Category
- C#
- Title
- if and c#
- Category
- C#
- Title
- can't add an editor script
- Category
- C#
- Title
- c# dictionaries
- Category
- C#
- Title
- unity vector3 smoothdamp not reaching target
- Category
- C#
- Title
- c# cheat sheet
- Category
- C#
- Title
- convert base64 string to string c#
- Category
- C#
- Title
- call a function c#
- Category
- C#
- Title
- clear combobox c#
- Category
- C#
- Title
- wpf textblock line break code behind
- Category
- C#
- Title
- math.pow in C# using loop
- Category
- C#
- Title
- c#if
- Category
- C#
- Title
- find gameobject with tag
- Category
- C#
- Title
- vb.net tostring numeric format string
- Category
- C#
- Title
- unity material offset script
- Category
- C#
- Title
- c# contextswitchdeadlock
- Category
- C#
- Title
- how to make a pause feautre in unity
- Category
- C#
- Title
- nullreferenceexception c#
- Category
- C#
- Title
- how to spawn coins randomly around the screen unity 2d
- Category
- C#
- Title
- C# Unknown column 'FundAllocation' in 'field list
- Category
- C#
- Title
- c# getasync response
- Category
- C#
- Title
- iterate through dictionary c#
- Category
- C#
- Title
- how to store some variables on the device in unity
- Category
- C#
- Title
- razor: show editable list
- Category
- C#
- Title
- c# null conditional
- Category
- C#
- Title
- unity rotate object relative to camera
- Category
- C#
- Title
- how to get array of children transform
- Category
- C#
- Title
- c# instantiate
- Category
- C#
- Title
- regex in c#
- Category
- C#
- Title
- Globalization and localization in ASP.NET Core
- Category
- C#
- Title
- appsettings in console application c#
- Category
- C#
- Title
- c# double question mark
- Category
- C#
- Title
- change textbox location C#
- Category
- C#
- Title
- how to parse a string to an integer c#
- Category
- C#
- Title
- how to add object in dictionary in c#
- Category
- C#
- Title
- c# winform remove button border
- Category
- C#
- Title
- c# get last character of string
- Category
- C#
- Title
- value is null to insert in c#
- Category
- C#
- Title
- how to see if they are aholding down a key unity
- Category
- C#
- Title
- c# get list of all class fields
- Category
- C#
- Title
- get set c#
- Category
- C#
- Title
- c# for loop without increment
- Category
- C#
- Title
- c# inline if
- Category
- C#
- Title
- http post request login example asp.net c#
- Category
- C#
- Title
- c# making a folder
- Category
- C#
- Title
- how to convert iformfile to byte array c#
- Category
- C#
- Title
- c# how to exit program
- Category
- C#
- Title
- c# httpclient azure function authorization
- Category
- C#
- Title
- How to get number of months between 2 dates c#
- Category
- C#
- Title
- c# System.Resources.MissingManifestResourceException error
- Category
- C#
- Title
- unity get list length
- Category
- C#
- Title
- c# convert byte to char
- Category
- C#
- Title
- declare string array c# without size
- Category
- C#
- Title
- how get data from json in c#
- Category
- C#
- Title
- isprime c#
- Category
- C#
- Title
- c# char array to string
- Category
- C#
- Title
- c# delegate return value invoke
- Category
- C#
- Title
- c# quick "is" "as"
- Category
- C#
- Title
- c# exit program
- Category
- C#
- Title
- c# retrieve files in folder
- Category
- C#
- Title
- c# stop loop
- Category
- C#
- Title
- unity how to check object position
- Category
- C#
- Title
- asp.net core redirecttoaction with parameters
- Category
- C#
- Title
- c# print
- Category
- C#
- Title
- unity rotate towards mouse
- Category
- C#
- Title
- how to declare variables in c#
- Category
- C#
- Title
- c# datafield change cell background color
- Category
- C#
- Title
- firefoxoptions setpreference to trust certificates
- Category
- C#
- Title
- c# send email
- Category
- C#
- Title
- how can convert string to int csharp
- Category
- C#
- Title
- c# index in select
- Category
- C#
- Title
- install .net sdk ubuntu 20
- Category
- C#
- Title
- c# replace foreach with lambda
- Category
- C#
- Title
- Execute code every x seconds with Update()
- Category
- C#
- Title
- how to clear console through script unity
- Category
- C#
- Title
- unity detect any key
- Category
- C#
- Title
- how to get specific length of row in matrix c#
- Category
- C#
- Title
- mvc c# w3schools
- Category
- C#
- Title
- how to add a componet to a gameobject throgh code unity
- Category
- C#
- Title
- convert int to double c#
- Category
- C#
- Title
- unity cast int to float
- Category
- C#
- Title
- httpcontext in .net standard
- Category
- C#
- Title
- c# substring from index to end
- Category
- C#
- Title
- how to reference scripts in other scenes unity
- Category
- C#
- Title
- c# how to take from a float
- Category
- C#