调整VB.NET中图片框的大小 [英] Resize picture box in VB.NET
本文介绍了调整VB.NET中图片框的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在网上搜索了,但找不到答案.
I have searched over the web and i can''t find an answer. How to resize a picture box to fit an image that loads a user?
推荐答案
- 获取图片 [大小属性 [ PictureBox's [
- Get an Image[^] loaded, maybe using
Image.FromFile(String path)
- Use the Size property[^] of that loaded Image to get the dimensions in pixel
- Use your PictureBox''s[^] Height and Width property to set the correct height and width you retrieved from the previous step.
问候,
Regards,
这篇关于调整VB.NET中图片框的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文