求助:vb图片随图片框大小变化
OptionExplicitPrivateSubCmdendEX_Click()Picture1.Top=0Picture1.Width=10800Picture1.Le...
Option Explicit
Private Sub CmdendEX_Click()
Picture1.Top = 0
Picture1.Width = 10800
Picture1.Left = 0
Picture1.Height = 9000
Picture1.Scale (-900, 1000)-(900, -500)
Picture1.PaintPicture Picture1.picture, -900, 1000, Picture1.Width, Picture1.Height
End Sub
Private Sub CmdEX_Click()
Picture1.Top = 1200
Picture1.Width = 7200
Picture1.Left = 1530
Picture1.Height = 6000
Picture1.Scale (-900, 1000)-(900, -500)
Picture1.PaintPicture Picture1.picture, -900, 1000, Picture1.Width, Picture1.Height
End Sub
Private Sub Form_Load()
Picture1.PaintPicture Picture1, 0, 0, Picture1.Width, Picture1.Height
Picture1.Scale (-900, 1000)-(900, -500)
End Sub
我的autosize属性设置为false,autoredraw设置为true,我是想让图片随着图片框大小变化,并不是图片框随图片变化。 展开
Private Sub CmdendEX_Click()
Picture1.Top = 0
Picture1.Width = 10800
Picture1.Left = 0
Picture1.Height = 9000
Picture1.Scale (-900, 1000)-(900, -500)
Picture1.PaintPicture Picture1.picture, -900, 1000, Picture1.Width, Picture1.Height
End Sub
Private Sub CmdEX_Click()
Picture1.Top = 1200
Picture1.Width = 7200
Picture1.Left = 1530
Picture1.Height = 6000
Picture1.Scale (-900, 1000)-(900, -500)
Picture1.PaintPicture Picture1.picture, -900, 1000, Picture1.Width, Picture1.Height
End Sub
Private Sub Form_Load()
Picture1.PaintPicture Picture1, 0, 0, Picture1.Width, Picture1.Height
Picture1.Scale (-900, 1000)-(900, -500)
End Sub
我的autosize属性设置为false,autoredraw设置为true,我是想让图片随着图片框大小变化,并不是图片框随图片变化。 展开
2个回答
展开全部
Picture1.AutoSize = True
AutoSize 属性,图片自动适应图片框大小
你可引用image控件
Image1.Stretch = True
Image1.Picture = Picture1.Picture
AutoSize 属性,图片自动适应图片框大小
你可引用image控件
Image1.Stretch = True
Image1.Picture = Picture1.Picture
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
设计时载入图片则:
dim p as stdpicture
Form_Load里面加:
set p=Picture1.picture
Picture1_Resize里写:
Picture1.PaintPicture Picture1, Picture1.scaleleft, Picture1.scaletop, Picture1.scaleWidth, Picture1.scaleHeight
dim p as stdpicture
Form_Load里面加:
set p=Picture1.picture
Picture1_Resize里写:
Picture1.PaintPicture Picture1, Picture1.scaleleft, Picture1.scaletop, Picture1.scaleWidth, Picture1.scaleHeight
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询