VB6.0使用Image控件作为按钮使用,在切换图片的时候,为什么会闪一下?
MouseDown事件以及MouseUp事件,这两个事件是会切换Image控件的Picture的使用的是LoadPicture函数加载图片每次切换图片的时候,Image控...
MouseDown事件以及MouseUp事件,这两个事件是会切换Image控件的Picture的
使用的是LoadPicture函数加载图片
每次切换图片的时候,Image控件都会闪烁一下,很难受,有大神知道解决方法的么?
部分代码如下:
Private Sub Image_背景_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ImageChange
If Image_登录_Change = 1 Then
ImageChange = Split(ImagePath02(0), "=")
Image_登录按钮.Picture = LoadPicture(ImageChange(1))
Image_登录_Change = 0
End If
If Image_退出_Change = 1 Then
ImageChange = Split(ImagePath02(3), "=")
Image_退出.Picture = LoadPicture(ImageChange(1))
Image_退出_Change = 0
End If
End Sub
Private Sub Image_登录按钮_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ImageChange
If Button = 1 Then
ImageChange = Split(ImagePath02(2), "=")
Image_登录按钮.Picture = LoadPicture(ImageChange(1))
End If
End Sub
Private Sub Image_登录按钮_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ImageChange
ImageChange = Split(ImagePath02(1), "=")
If Image_登录_Change = 0 Then
Image_登录按钮.Picture = LoadPicture(ImageChange(1))
Image_登录_Change = 1
End If
End Sub
End Sub[/code] 展开
使用的是LoadPicture函数加载图片
每次切换图片的时候,Image控件都会闪烁一下,很难受,有大神知道解决方法的么?
部分代码如下:
Private Sub Image_背景_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ImageChange
If Image_登录_Change = 1 Then
ImageChange = Split(ImagePath02(0), "=")
Image_登录按钮.Picture = LoadPicture(ImageChange(1))
Image_登录_Change = 0
End If
If Image_退出_Change = 1 Then
ImageChange = Split(ImagePath02(3), "=")
Image_退出.Picture = LoadPicture(ImageChange(1))
Image_退出_Change = 0
End If
End Sub
Private Sub Image_登录按钮_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ImageChange
If Button = 1 Then
ImageChange = Split(ImagePath02(2), "=")
Image_登录按钮.Picture = LoadPicture(ImageChange(1))
End If
End Sub
Private Sub Image_登录按钮_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim ImageChange
ImageChange = Split(ImagePath02(1), "=")
If Image_登录_Change = 0 Then
Image_登录按钮.Picture = LoadPicture(ImageChange(1))
Image_登录_Change = 1
End If
End Sub
End Sub[/code] 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询