回复 19# qsy666888
回到你原来的。
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include '_dButton.au3'
Opt("GUIOnEventMode", 1)
zhugui()
Global $Gui, $btn_ok, $btn_ex
Func xshi()
Global $Gui = GUICreate("动态按钮he控件指示", 300, 100, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "GuiClose")
Global $ex = GUICtrlCreateLabel(" X ", 280, 2, 17, 12)
WinSetTrans($Gui, "", 255);必须要使用此函数,即使透明值设置为255,也就是不透明都可以,但是不能没有
Global $btn_ok = GUICtrlCreateButton("", 50, 47, 100, 26, $BS_BITMAP)
GUICtrlSetImage(-1, "Bitmap_181.bmp")
GUICtrlSetCursor(-1, 0)
Global $btn_ex = GUICtrlCreateButton("", 180, 44, 32, 32, $BS_ICON)
GUICtrlSetImage(-1, "Bitmap_181.ico")
GUICtrlSetCursor(-1, 0)
Global $Pic1 = GUICtrlCreatePic("bg.jpg", 0, 0, 300, 100, $WS_CLIPSIBLINGS)
GUICtrlCreateLabel("", 0, 0, 300, 100, $WS_CLIPSIBLINGS, $GUI_WS_EX_PARENTDRAG)
Global $label = GUICtrlCreateLabel("当鼠标处于本行文字上方,将进行提示", 50, 15)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0xff0000)
GUISetState(@SW_SHOW)
EndFunc ;==>xshi
While 1
Sleep(250)
_dButton($Gui, $btn_ok, "Bitmap_181.bmp", "Bitmap_186.bmp", "Bitmap_187.bmp");如果去掉,但达不到效果
_dButton($Gui, $btn_ex, "Bitmap_181.ico", "Bitmap_186.ico", "Bitmap_187.ico");这两行
WEnd
Func GuiClose()
Exit
EndFunc ;==>GuiClose
Func zhugui()
Global $Form1 = GUICreate("Form1", 475, 203, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
Global $Button1 = GUICtrlCreateButton("显 示", 128, 88, 185, 41)
GUICtrlSetOnEvent($Button1, "xianshi")
GUISetState()
EndFunc ;==>zhugui
Func Form1Close()
Exit
EndFunc ;==>Form1Close
Func xianshi()
xshi()
EndFunc ;==>xianshi
|