|
为什么用GUICtrlCreatePic添加的背景图片后GUICtrlCreateTab不显示呢!
代码如下:
Opt("GUICoordMode", 1)
Global $hGui, $bios, $display, $cpu, $mem, $hdd, $cdrom, $bios1, $display1, $cpu1, $mem1, $hdd1, $cdrom1
Global $bios2, $board2, $display2, $cpu2, $mem2, $hdd2, $cdrom2, $bios3, $display3, $cpu3, $mem3, $hdd3, $cdrom3, $Output, $time
Global $WLength1, $WLength2, $WLength3, $WLength4, $WLength5, $WLength6
#Region ### START Koda GUI section ###
$hGui = GUICreate("Hardware", 560, 300, -1, -1)
GUISetFont(11, 400)
FileDelete(@tempdir&"\8.jpg")
FileInstall("8.jpg", @tempdir&"\8.jpg")
$Pic1 = GUICtrlCreatePic(@tempdir&"\8.jpg", -16, 0, 600, 380,$WS_EX_TOPMOST);防$Combo1鼠标点击无作用在PIC控件后面加$WS_EX_TOPMOST这个样式就可
GUICtrlCreateButton("CPU", 10, 40, 50, 30)
GUICtrlCreateButton("硬盘", 10, 120, 50, 30)
GUICtrlCreateButton("内存", 10, 80, 50, 30)
GUICtrlCreateButton("光驱", 10, 160, 50, 30)
GUICtrlCreateButton("显卡", 10, 200, 50, 30)
GUICtrlSetFont(-1, 12, 400, "Times New Roman")
$Tab1 = GUICtrlCreateTab(62, 13, 478, 220)
$TabSheet1 = GUICtrlCreateTabItem(" 当前硬件信息 ")
GUISwitch($hGui, $TabSheet1)
$cpu = GUICtrlCreateInput("", 65, 40, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$mem = GUICtrlCreateInput("", 65, 80, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$hdd = GUICtrlCreateInput("", 65, 120, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$cdrom = GUICtrlCreateInput("", 65, 160, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$display = GUICtrlCreateInput("", 65, 200, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$TabSheet2 = GUICtrlCreateTabItem(" 参考硬件信息 ")
$cpu2 = GUICtrlCreateInput("", 65, 40, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$mem2 = GUICtrlCreateInput("", 65, 80, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$hdd2 = GUICtrlCreateInput("", 65, 120, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$cdrom2 = GUICtrlCreateInput("", 65, 160, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
$display2 = GUICtrlCreateInput("", 65, 200, 470, 30, $ES_READONLY)
GUICtrlSetFont(-1, 14, 400, 0, "")
GUICtrlCreateTabItem("")
$button = GUICtrlCreateButton("保存信息", 150, 260, 100, 35)
$buttonpass = GUICtrlCreateButton("测试通过", 380, 260, 100, 35)
GUICtrlCreateLabel("红色的为硬件有差异或者是有问题,请仔细检查", 70, 235, 320, 20)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT);设置为背景透明
GUISetState()
;生成抓取当前硬件信息的界面
#EndRegion ### END Koda GUI section ### |
|