Private Sub Command1_Click()
Picture1.Width = Picture1.Width * 1.2
Picture1.Height = Picture1.Height * 1.2
End Sub
Private Sub Command10_Click()
Dim p()
ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.ScaleMode = 3
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
ReDim p(w - 1, h - 1)
For i = 0 To w - 1
For j = 0 To h - 1
p(i, j) = Picture1.Point(i, j)
Next j
Next i
For i = 0 To w - 1
For j = 0 To h - 1
Picture1.PSet (i, j), p(w - i - 1, h - j - 1)
Next j
Next i
End Sub
Private Sub Command2_Click()
Picture1.Width = Picture1.Width / 1.2
Picture1.Height = Picture1.Height / 1.2
End Sub
Private Sub Command3_Click()
Dim p()
ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.ScaleMode = 3
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
ReDim p(w - 1, h - 1)
For i = 0 To w - 1
For j = 0 To h - 1
p(i, j) = Picture1.Point(i, j)
Next j
Next i
Picture1.Width = h + 4 * Picture1.BorderStyle
Picture1.Height = w + 4 * Picture1.BorderStyle
For i = 0 To h - 1
For j = 0 To w - 1
Picture1.PSet (i, w - j - 1), p(j, i)
Next j
Next i
End Sub
Private Sub Command9_Click()
Dim p()
ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.ScaleMode = 3
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
ReDim p(w - 1, h - 1)
For i = 0 To w - 1
For j = 0 To h - 1
p(i, j) = Picture1.Point(i, j)
Next j
Next i
Picture1.Width = h + 4 * Picture1.BorderStyle
Picture1.Height = w + 4 * Picture1.BorderStyle
For i = 0 To h - 1
For j = 0 To w - 1
Picture1.PSet (h - i - 1, j), p(j, i)
Next j
Next i
End Sub
Private Sub Dir1_Change() '目录change事件
File1.Path = Dir1.Path '目录发生更改时,做出文件路径更改的响应
End Sub
Private Sub Drive1_Change() '驱动器change事件
Dir1.Path = Drive1.Drive '当驱动器发生改变时,做出响应
ChDrive Drive1.Drive
End Sub
Private Sub file1_Click()
Picture1.Picture = LoadPicture(File1.Path + "\" + File1.FileName) '单击文件名时,显示图像
End Sub
我用这个做出来的图片为什么图片缩放不成功呢 老是框在变化,图片不变
Picture1.Width = Picture1.Width * 1.2
Picture1.Height = Picture1.Height * 1.2
End Sub
Private Sub Command10_Click()
Dim p()
ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.ScaleMode = 3
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
ReDim p(w - 1, h - 1)
For i = 0 To w - 1
For j = 0 To h - 1
p(i, j) = Picture1.Point(i, j)
Next j
Next i
For i = 0 To w - 1
For j = 0 To h - 1
Picture1.PSet (i, j), p(w - i - 1, h - j - 1)
Next j
Next i
End Sub
Private Sub Command2_Click()
Picture1.Width = Picture1.Width / 1.2
Picture1.Height = Picture1.Height / 1.2
End Sub
Private Sub Command3_Click()
Dim p()
ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.ScaleMode = 3
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
ReDim p(w - 1, h - 1)
For i = 0 To w - 1
For j = 0 To h - 1
p(i, j) = Picture1.Point(i, j)
Next j
Next i
Picture1.Width = h + 4 * Picture1.BorderStyle
Picture1.Height = w + 4 * Picture1.BorderStyle
For i = 0 To h - 1
For j = 0 To w - 1
Picture1.PSet (i, w - j - 1), p(j, i)
Next j
Next i
End Sub
Private Sub Command9_Click()
Dim p()
ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.ScaleMode = 3
w = Picture1.ScaleWidth
h = Picture1.ScaleHeight
ReDim p(w - 1, h - 1)
For i = 0 To w - 1
For j = 0 To h - 1
p(i, j) = Picture1.Point(i, j)
Next j
Next i
Picture1.Width = h + 4 * Picture1.BorderStyle
Picture1.Height = w + 4 * Picture1.BorderStyle
For i = 0 To h - 1
For j = 0 To w - 1
Picture1.PSet (h - i - 1, j), p(j, i)
Next j
Next i
End Sub
Private Sub Dir1_Change() '目录change事件
File1.Path = Dir1.Path '目录发生更改时,做出文件路径更改的响应
End Sub
Private Sub Drive1_Change() '驱动器change事件
Dir1.Path = Drive1.Drive '当驱动器发生改变时,做出响应
ChDrive Drive1.Drive
End Sub
Private Sub file1_Click()
Picture1.Picture = LoadPicture(File1.Path + "\" + File1.FileName) '单击文件名时,显示图像
End Sub
我用这个做出来的图片为什么图片缩放不成功呢 老是框在变化,图片不变