楼主的问题有问题,当Label控件使用GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) 且Label控件的背景是一副图片时, Label控件的显示本身就是透明的,并没有底色(就像水印效果).如果楼主并不是要那种效果,中文帮助中有个例子,你看下是不是你想要的效果:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Local $gui, $background, $pic, $basti_stay, $msg
Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") & "\Examples\GUI\logo4.gif"
$gui = GUICreate("Background", 400, 100)
$background = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 0, 0, 400, 100)
GUISetState(@SW_SHOW)
$pic = GUICreate("", 169, 68, 0, 0, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_MDICHILD, $gui)
$basti_stay = GUICtrlCreatePic($sFile, 0, 0, 169, 68)
GUISetState(@SW_SHOW)
Do
$msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
[ 本帖最后由 漠北雪~狼 于 2008-5-13 09:23 编辑 ] |