Windows图形应用程序 [英] Windows Graphics Application

查看:105
本文介绍了Windows图形应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我正在使用桌面图形应用程序。我在OnPaint方法中使用Graphics.DrawEllipse函数在屏幕上绘制一个实心圆。圆形大小为50,50即传递给DrawEllipse方法的矩形尺寸为50,50。但我的问题是,当我更改屏幕分辨率时,屏幕上绘制的圆形看起来宽度和高度不同。有些事情是错的,我不理解。任何人都知道如何处理不同的决议?



我也尝试过Screen.PrimaryScreen.Bounds来获得宽高比,但是对于所有分辨率仍然不能正常工作。





提前感谢您的时间。

解决方案

我想(我没有测试过它)你可以:






Hi,


I am working on a desktop Graphics Application. I am drawing a filled circle on the screen using Graphics.DrawEllipse function in OnPaint method. The circle size is 50, 50 ie Rectangle dimensions passed to DrawEllipse method is 50, 50. But my problem is that the Circle drawn on the screen does not looks of equal width and height when i change Screen resolution. Some thing is going wrong that i am not understanding. Any one have any idea how to handle different resolutions?

I have also tried the Screen.PrimaryScreen.Bounds to get the width to height ratio but that still not works fine for all resolutions.


Thanks in advance for your time.

解决方案

I suppose (I've not tested it) you may either:

or
.


这篇关于Windows图形应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆