注册 登录
编程论坛 VB.NET论坛

专家们好,vb.net 如何将放大的图片放置在最前面!

tlqxjzlq 发布于 2017-03-13 09:32, 2408 次点击
请教各位专家,一个窗体里显示4张图片,想任意点击一张图片放大,图片在最前面,怎么解决呀!
2 回复
#2
guchew2017-04-09 14:06
给你写出代码:
 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
    ' 你可以对图片框显示位置做适当调整。
#3
a150501334872017-09-03 21:42
已调试,ok!感谢楼主!
1