We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
笔记本电脑一般屏幕缩放比例一般都是125%或者150%,截图的时候没有考虑这个问题,导致最后截取的图片范围比实际选择的区域要小很多
1、笔记本电脑缩放比例调节到150% 2、测试截图demo
弹出的截图窗口中的图片比实际选择范围要小
No response
HandyControl 3.4.0
Visual Studio 2022
.Net Framework 4.7.2
Windows 11 (22000)
The text was updated successfully, but these errors were encountered:
可以这样修改下代码,但是需要引用Syatem.Drawing.dll,代码如下 ScreenshotWindow.cs private void SaveScreenshot() { int top = _targetWindowRect.Top; int left = _targetWindowRect.Left; int width = _targetWindowRect.Width; int height = _targetWindowRect.Height; using (System.Drawing.Graphics graphics = System.Drawing.Graphics.FromHwnd(IntPtr.Zero)) { float dpiX = graphics.DpiX; float dpiY = graphics.DpiY; var scale = dpiX / 96.0; top = (int) (top * scale); left = (int) (left * scale); width = (int) (width * scale); height = (int) (height * scale); } var cb = new CroppedBitmap(_imageSource, new Int32Rect(left, top,width,height)); _screenshot.OnSnapped(cb); Close(); }
Sorry, something went wrong.
No branches or pull requests
Describe the bug
笔记本电脑一般屏幕缩放比例一般都是125%或者150%,截图的时候没有考虑这个问题,导致最后截取的图片范围比实际选择的区域要小很多
Steps to reproduce the bug
1、笔记本电脑缩放比例调节到150%
2、测试截图demo
Expected behavior
弹出的截图窗口中的图片比实际选择范围要小
Screenshots
No response
NuGet package version
HandyControl 3.4.0
IDE
Visual Studio 2022
Framework type
.Net Framework 4.7.2
Windows version
Windows 11 (22000)
Additional context
No response
The text was updated successfully, but these errors were encountered: