找回密码
 加入
搜索
查看: 3689|回复: 3

[GUI管理] GUICtrlCreatePic与GUICtrlCreateTab问题

[复制链接]
发表于 2011-9-15 00:53:06 | 显示全部楼层 |阅读模式
为什么用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 ###
 楼主| 发表于 2011-9-15 00:57:50 | 显示全部楼层
在新建分页标签$Tab1 = GUICtrlCreateTab(62, 13, 478, 220)后
加:GuiCtrlSetState(-1,$GUI_ONTOP),就会出现鼠标移动到$TabSheet1或$TabSheet2上才显会示它们的文本 “ 当前硬件信息”或“参考硬件信息”,
 楼主| 发表于 2011-9-15 01:02:38 | 显示全部楼层
回复 2# mgj8721

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-9-15 17:55:19 | 显示全部楼层
学习一下。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-23 12:55 , Processed in 0.247014 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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