일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- flutter
- AlertDialog
- ubuntu 19 한글 입력
- flutter button
- peaks
- debug banner
- TCPIP
- Properties.Settings.Default
- ListView.build
- showDialog
- c
- flutter tcpip client
- Listview filtering
- array
- dart:io
- flutter tcpip server
- Server
- debugShowCheckedModeBanner
- Today
- Total
Louie De Janeiru
c# 스크린 캡쳐하기 본문
Graphics의 CopyFromScreen()함수가 주역
//현재 폼 캡쳐
private void btnCapture_Click(object sender, EventArgs e)
{
ScreenCapture(this.Width, this.Height, this.Location);
}
//Full Screen 캡쳐
private void btnFullScreenCapture_Click(object sender, EventArgs e)
{
ScreenCapture(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height,
new Point(0, 0));
}
//캡쳐 함수
private void ScreenCapture(int intBitmapWidth, int intBitmapHeight, Point ptSource)
{
Bitmap bitmap = new Bitmap(intBitmapWidth, intBitmapHeight);
Graphics g = Graphics.FromImage(bitmap);
g.CopyFromScreen(ptSource, new Point(0, 0), new Size(intBitmapWidth, intBitmapHeight));
bitmap.Save(@"D:\Test.png", ImageFormat.Png);
picCapImage.Image = bitmap;
picCapImage.SizeMode = PictureBoxSizeMode.StretchImage;
}
from http://najsulman.tistory.com/m/519
'Utils' 카테고리의 다른 글
C-code 정렬 (0) | 2017.08.25 |
---|---|
EXCEL - 다른 sheet에 있는 셀의 값을 평균/MAX/MIN 취하기 (0) | 2017.06.29 |
ST Platform에서 printf사용 (0) | 2017.06.26 |
iar printf float 표현 (0) | 2017.03.16 |
printf 자리수 (0) | 2017.02.14 |