调整VB.NET中图片框的大小 [英] Resize picture box in VB.NET

查看:231
本文介绍了调整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?

推荐答案


  1. 获取图片 [大小属性 [ PictureBox's [

  1. Get an Image[^] loaded, maybe using Image.FromFile(String path)
  2. Use the Size property[^] of that loaded Image to get the dimensions in pixel
  3. Use your PictureBox''s[^] Height and Width property to set the correct height and width you retrieved from the previous step.



问候,

—曼弗雷德(Manfred)



Regards,

— Manfred


这篇关于调整VB.NET中图片框的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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