Dpi 점은 응용 프로그램이 실행되는 디스플레이의 픽셀과 어떤 관련이 있습니까?DPI 그래픽 화면 해상도 픽셀 WinForm PrintPageEventArgs
int points;
Screen primary;
public Form1() {
InitializeComponent();
points = -1;
primary = null;
}
void OnPaint(object sender, PaintEventArgs e) {
if (points < 0) {
points = (int)(e.Graphics.DpiX/72.0F); // There are 72 points per inch
}
if (primary == null) {
primary = Screen.PrimaryScreen;
Console.WriteLine(primary.WorkingArea.Height);
Console.WriteLine(primary.WorkingArea.Width);
Console.WriteLine(primary.BitsPerPixel);
}
}
이제 모든 정보가 필요합니까?
위의 정보 중 하나를 사용하여 1200 픽셀의 길이를 확인할 수 있습니까?
참고 : 양식을 보편적으로 표시하는 방법을 배우게되면 해당 양식의 데이터가 프린터로 전송되므로 제목의 'PrintPageEventArgs'가 전송됩니다. – jp2code