编辑: 梦里红妆 2014-12-31

2.2 VBScript.vbs文件 VBScript.vbs主负责QQ面板上各部分按钮的功能实现,在此实现与QQ之间的交互,同时还负责确定各部分图片在面板中的定位(如新皮肤中涉及到的调整按钮位置、皮肤提供的拉伸功能等需在此完成). 找到QQ安装路径,以记事本的形式打开 \ qq \ skin \ QQ2003 \ VBScript.vbs,具体程序如下: 注意: 黑色粗体显示的Window.LockPaint()和Window.UnLockPaint()函数在程序的相应位置必须调用,不可省略 为方面大家熟悉程序,采用'

注释对代码进行注释 '

注释 '

定义全局变量 Dim BottomHeight Dim CornerHeight Dim UseNum Dim UseStatus Dim StatusIcon Dim showbar Dim Path Dim strQQMailTip BottomHeight =

61 '

加载皮肤事件,包括: QQ好友面板 、离线状态、QQ2003皮肤、显示侧边框,QQ号码和邮件数目 sub Window_OnInit() FriendBar.disabled = True TencentServerBar.disabled = False MobileBar.disabled = False BQQBar.disabled = False Celltopcorner1.visible = False StatusIcon = Offline.ico UseStatus = 离线 Path = skins\\QQ2003\\ UseNum =

0 strQQMailTip = 0封未收 showbar = true end sub '

改变窗体大小事件,当QQ面板被上下左右拉缩、长短宽窄发生变化后,各部分的相对位置及皮肤制作过程中要改变的各部分和按钮的位置,需在此进行修改 sub Window_OnSize(cx,cy) '

在此处必须调用,不可省略 Window.LockPaint() BG.width = cx -2 BG.Height = cy title.width = cx BGline.height = cy -

5 '

是否显示侧边框 if showbar = True then BarBtns.visible = True Tencent.visible = True BarFrame.left = BarBtns.left + BarBtns.width -

1 QQMain.left =44 else BarBtns.visible = False Tencent.visible = False BarFrame.left =

4 QQMain.left =

30 end if QQBG.left = QQ.width QQBG.width = cx - QQ.width - TitleBtns1.width - QQ1.width TitleR1.left = cx - TitleR1.width TitleBtns1.left = TitleR1.left QQ1.left = cx - TitleBtns1.width - QQ1.width sysbottom.top = cy -

5 sysbottom1.top = sysbottom.top sysbottom1.left = cx -

6 sysbottom2.top = cy -

1 sysbottom2.width = cx -

10 DisableBarBtn1.left = BarBtns.left -

1 DisableBarBtn1.top = cy -

23 DisableBarBtn2.left = BarBtns.left +2 DisableBarBtn2.top = cy -

21 Tencent.top = cy -

193 '

边框 BarFrame.top = title.height +

3 BarFrame.width = cx -

3 - BarFrame.left BarFrame.height = cy - bottomheight - BarFrame.top -

3 CellBG.width = BarFrame.width -

4 CellBG.height = BarFrame.height -

2 CellRight.left = BarFrame.width -

2 CellRight.height = CellBG.height Cellleft.height = CellBG.height Celltopcorner.left = BarFrame.width -

5 CellRightcorner.left = Celltopcorner.left CellRightcorner.top = BarFrame.height -

7 Cellleftcorner.top = BarFrame.height -

7 '

QQ号码 MyQQNum.value = UseNum '

QQ邮件数目 QQMailTip.label = strQQMailTip '

MaxWidth = BarFrame.width -

9 '

offset = MyQQNum.width - MaxWidth '

if offset>

0 then '

MyQQNum.width = MyQQNum.width - offset '

end if Bar1.width = BarFrame.width -

6 Bar1.height = BarFrame.height -

37 Bar2.width = Bar1.width Bar2.height = Bar1.height Bar3.width = Bar1.width Bar3.height = Bar1.height Bar4.width = Bar1.width Bar4.height = Bar1.height '

第一排按钮 BtnBG1_Left.top = BarFrame.top + BarFrame.height BtnBG1_Left.left = BarFrame.left BtnBG1_Middle.top = BtnBG1_Left.top BtnBG1_Middle.width = BarFrame.width -

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题