C#(winform)实现不同DPI控件自适应1

1. PicBox控件   

        顺便一提关键字:stretch [stretʃ] vt. 伸展,张开

//控制pictureBox图片的显示格式
this.picClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
//这个才是控制跟随DPI自适应的
this.picClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
View Code

2.label控件

      如果是在LayoutPanel中,可以尝试 AutoSize = true

posted @ 2015-02-03 10:50  一菲聪天  阅读(3137)  评论(0编辑  收藏  举报