展开全部
用PS修改图片
或是
用VB缩放图片兄尺唤
'在窗体上增加下面控件:
' picture1
'image1(在picture1内,stretch=true,同时要装入图片,以便看到效果)
'option1(caption="放大",value=true)
'option2(caption="缩小",value=false)
'option3(caption="还原",value=false)
'在窗体代码区复制下困高面代码,运行后先选择相应按钮,然后再点击图片,就会看到效果。
'====窗体代码====
Option Explicit
Dim OldTop As Long, OldLeft As Long, OldWidth As Long, OldHeight As Long
Private Sub Form_Load()
With Image1
OldTop = .Top
OldLeft = .Left
OldWidth = .Width
OldHeight = .Height
End With
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim mWidth As Long, mHeight As Long
If Option1.Value = True Then '放大
With Image1
Image1.Move .Left - X * 0.1, .Top - Y * 0.1, .Width * 1.1, .Height * 1.1
End With
End If
If Option2.Value = True Then '缩羡凯小
With Image1
Image1.Move .Left + X * 0.1, .Top + Y * 0.1, .Width * 0.9, .Height * 0.9
End With
End If
End Sub
Private Sub Option3_Click() '还原
With Image1
.Left = OldLeft
.Top = OldTop
.Width = OldWidth
.Height = OldHeight
End With
Option1.Value = True
End Sub
或是
用VB缩放图片兄尺唤
'在窗体上增加下面控件:
' picture1
'image1(在picture1内,stretch=true,同时要装入图片,以便看到效果)
'option1(caption="放大",value=true)
'option2(caption="缩小",value=false)
'option3(caption="还原",value=false)
'在窗体代码区复制下困高面代码,运行后先选择相应按钮,然后再点击图片,就会看到效果。
'====窗体代码====
Option Explicit
Dim OldTop As Long, OldLeft As Long, OldWidth As Long, OldHeight As Long
Private Sub Form_Load()
With Image1
OldTop = .Top
OldLeft = .Left
OldWidth = .Width
OldHeight = .Height
End With
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim mWidth As Long, mHeight As Long
If Option1.Value = True Then '放大
With Image1
Image1.Move .Left - X * 0.1, .Top - Y * 0.1, .Width * 1.1, .Height * 1.1
End With
End If
If Option2.Value = True Then '缩羡凯小
With Image1
Image1.Move .Left + X * 0.1, .Top + Y * 0.1, .Width * 0.9, .Height * 0.9
End With
End If
End Sub
Private Sub Option3_Click() '还原
With Image1
.Left = OldLeft
.Top = OldTop
.Width = OldWidth
.Height = OldHeight
End With
Option1.Value = True
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把下面的代码添枝袜加进去就可以禅搜了!!!
Private Sub Form_Load()
image1.Stretch = True
End Sub
祝你成功贺搭历!!!
Private Sub Form_Load()
image1.Stretch = True
End Sub
祝你成功贺搭历!!!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把Image的Stretch属性设成True。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询