专家们好,vb.net 如何将放大的图片放置在最前面!
请教各位专家,一个窗体里显示4张图片,想任意点击一张图片放大,图片在最前面,怎么解决呀!
给你写出代码:
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Static bz1 As Boolean = False
If bz1 = False Then
bz1 = True
PictureBox1.Width = 4 * PictureBox1.Width
PictureBox1.Height = 4 * PictureBox1.Height
PictureBox1.BringToFront()
Else
bz1 = False
PictureBox1.Width = 0.25 * PictureBox1.Width
PictureBox1.Height = 0.25 * PictureBox1.Height
End If
' 你可以对图片框显示位置做适当调整。