缩放图像及图象上的label框 对图象缩放通过改变控件image或picture的;scalewidth和scaleheight实现 对label缩放改变width和height就可以, 使label根据图象缩放的比率缩放。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对LABEL大小的缩放,同意楼上。但LABEL中的字可不会像图象一样。所以建议都使用图象,好控制! mornwoo(疾风之虫) ,能不能给一个简单的例子,就是在PICTURE框上有一个label框,根据比例缩放。 对于图象本身的缩放自己根据需要书写了,关键的是函数:funZoomLabel 此函数仅供参考Private Sub Command1_Click()Dim iZoom As Integer '放大倍数 iZoom = 2 Picture1.PaintPicture Picture1, 0, 0, Picture1.Width, Picture1.Height _ , 0, 0, Picture1.Width / iZoom, Picture1.Height / iZoom funZoomLabel Label1, 2End SubPrivate Sub funZoomLabel(ByRef lbl As Label, ByVal iZoom As Integer) '位置 lbl.Top = lbl.Top * iZoom lbl.Left = lbl.Left * iZoom lbl.BackStyle = 0 '透明色 lbl.Width = lbl.Width * iZoom lbl.Height = lbl.Height * iZoom lbl.FontSize = lbl.FontSize * iZoomEnd Sub 新手求助VB程序升级到.net的问题 vb调用dll VB中如何把文件保存应用程序所在目录的下一级目录中 请问在VB里,赋值的时候,为什么有时候用SET,有时候可以直接赋值。有什么区别吗? toolbar问题:在windows字体设为小字体时,toolbar内出现错乱 有关窗体显示的问题 讨教实现方法,up者有分 如何用API提取IE页面中一个下拉框的文本? 检测某程序运行实例数,并控制该实例 高手请指教指教本菜鸟刚学编程应先学那一门好?~》》~~》~。。`~~(0)~! 一个简单的问题,大家来帮帮小弟~!谢啦 定义纸张大小
所以建议都使用图象,好控制!
此函数仅供参考Private Sub Command1_Click()
Dim iZoom As Integer '放大倍数
iZoom = 2
Picture1.PaintPicture Picture1, 0, 0, Picture1.Width, Picture1.Height _
, 0, 0, Picture1.Width / iZoom, Picture1.Height / iZoom
funZoomLabel Label1, 2
End SubPrivate Sub funZoomLabel(ByRef lbl As Label, ByVal iZoom As Integer)
'位置
lbl.Top = lbl.Top * iZoom
lbl.Left = lbl.Left * iZoom
lbl.BackStyle = 0 '透明色
lbl.Width = lbl.Width * iZoom
lbl.Height = lbl.Height * iZoom
lbl.FontSize = lbl.FontSize * iZoom
End Sub