找回密码
 加入
搜索
查看: 2552|回复: 1

[特效] 求大神,做图片按钮效果时,图片老是闪烁个不停怎么破

[复制链接]
发表于 2015-8-27 12:19:05 | 显示全部楼层 |阅读模式
做图片按钮效果时,图片老是闪烁个不停怎么破哇
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Pic1 = GUICtrlCreatePic("1.bmp", 88, 64, 433, 269)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Local $a = GUIGetCursorInfo()
        If $nmsg = $GUI_EVENT_CLOSE Then ExitLoop
                $Pos = GUIGetCursorInfo($Form1)
                                If $pos[4]=$Pic1 Then
                                GUICtrlSetImage($Pic1,"\2.jpg")
                                Else
                                GUICtrlSetImage($Pic1,"\1.bmp")
                                EndIf
                                
WEnd
发表于 2015-8-27 18:27:58 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Pic1 = GUICtrlCreatePic("1.bmp", 88, 64, 433, 269)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
$Pos = GUIGetCursorInfo($Form1)

If $Pos[4] = $Pic1 Then
        GUICtrlSetImage($Pic1, "\2.jpg")
Else
        GUICtrlSetImage($Pic1, "\1.bmp")
EndIf

While 1
        $nMsg = GUIGetMsg()
        Local $a = GUIGetCursorInfo()
        If $nMsg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 04:13 , Processed in 0.071143 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表