|
|
侧边栏隐现代码(更新) |
|
|
侧边栏隐现代码(更新)
先说明,只适用于QQ2006的skin吧,我隐侧边的原因,是因为小图表+长名字实在看不全名字,我又不喜欢拉宽界面
抛砖引玉吧,其他人能做出更好的skin的
以下改的是VBScript.vbs的TT按钮
sub TTBtn_onClick()
Window.LockPaint()
if NewPanels.visible = true then
NewPanels.visible = false
NewPanels.width = 3
BarFrame.left = 3
else
NewPanels.visible = true
NewPanels.width = 26
BarFrame.left = NewPanels.left + NewPanels.width - 3
end if
BarFrame.width = BG.width - BarFrame.left + 3
CellBGCenter.width = BarFrame.width - 4
CellBGTop.width = BarFrame.width - 4
CellBGBottom.width = BarFrame.width - 4
CellBGCenter.height = BarFrame.height - 4
CellBGBottom.top = CellBGCenter.top + CellBGCenter.height
CellRight.left = BarFrame.width - 2
CellRight.height = CellBGCenter.height + 2
Cellleft.height = CellRight.height
Celltopcorner.left = BarFrame.width - 5
CellRightcorner.left = Celltopcorner.left
CellRightcorner.top = BarFrame.height - 7
Cellleftcorner.top = BarFrame.height - 7
Bar1.width = BarFrame.width - 6
Window.UnLockPaint()
end Sub
[[i] Last edited by 小道 on 2004-7-16 at 21:53 [/i]] |
|
谁给个改好的,不知道加在什么位置,加在原来的sub TTBtn_onClick()
语句后面,没变化啊 |
| weiking520 | 2004-7-16 12:39 |
|
| 顶~~~~~~~~~~~` |
|
可以的,要点那个TT图标才收,放的。
我是屏蔽了原来的调用TT浏览器的那句。
现在我想在收起侧边时改变主窗口大小,不知该如变?
获得和改变窗口大小是那个变量或函数。
[[i] Last edited by google on 2004-7-16 at 21:05 [/i]] |
|
替换原来的就可以了!
这个是修改过的!
你可以参照着修改原代码! |
|
Dim UseNum
Dim UseStatus
Dim StatusIco
Dim Path
Dim strQQMailTip
Dim CurrentWidth
'注释
sub Window_OnInit()
Window.GetScriptVersion "1.0"
StatusIcon = "Offline.ico"
UseStatus = "(离线)"
Path = "NewSkins\\QQ2006\\"
UseNum = "0" + UseStatus
strQQMailTip = "您没有新邮件"
End sub
sub Window_OnSize(cx,cy)
Window.LockPaint()
CurrentWidth = cx
BG.width = cx - 6
BG.Height = cy
BarBGDown.Height = BG.Height - BarBGTop.Height
title.width = cx
sysleftline.height = cy - 7
sysrightline.height = cy - 7
sysrightline.left = cx-3
BarFrame.left = NewPanels.left + NewPanels.width - 3
TitleMiddle.left = TtileLeft.width
TitleMiddle.width = cx - TtileLeft.width - TitleBtns1.width
TitleRight.left = cx - TitleRight.width
TitleBtns1.left = TitleRight.left + 1
sysbottom.top = cy - 7
sysbottom1.top = sysbottom.top
sysbottom1.left = cx - 8
sysbottom2.top = cy - 3
sysbottom2.width = cx - 16
'边框
BarFrame.top = 58
BarFrame.width = cx - 3 - BarFrame.left
BarFrame.height = cy - 50 - BarFrame.top - 3
CellBGCenter.width = BarFrame.width - 4
CellBGTop.width = BarFrame.width - 4
CellBGBottom.width = BarFrame.width - 4
CellBGCenter.height = BarFrame.height - 4
CellBGBottom.top = CellBGCenter.top + CellBGCenter.height
CellRight.left = BarFrame.width - 2
CellRight.height = CellBGCenter.height + 2
Cellleft.height = CellRight.height
Celltopcorner.left = BarFrame.width - 5
CellRightcorner.left = Celltopcorner.left
CellRightcorner.top = BarFrame.height - 7
Cellleftcorner.top = BarFrame.height - 7
MyQQNum.width = cx - MyQQNum.left - 4
QQMailTip.label = strQQMailTip
Bar1.width = BarFrame.width - 6
Bar1.height = BarFrame.height - 7
BottomFrameLeft.top = cy -52
BottomFrameRight.top=BottomFrameLeft.top
BottomFrameMid.top=BottomFrameLeft.top
BottomFrameRight.left = cx - 5 - BottomFrameRight.width
BottomFrameMid.left = BottomFrameLeft.left +BottomFrameLeft.width
BottomFrameMid.width = BottomFrameRight.left - (BottomFrameLeft.left +BottomFrameLeft.width)
'第一排按钮
ChatBtn.top = cy - 45
PhoneBtn.top = ChatBtn.top
GameBtn.top = ChatBtn.top
TTBtn.top = ChatBtn.top
PhoneBtn.Left = 12
GameBtn.left = PhoneBtn.Left + PhoneBtn.width + 1
TTBtn.Left = GameBtn.left + GameBtn.width + 7
ChatBtn.Left = TTBtn.left + TTBtn.width + 7
'第二排按钮
QQMain.top = ChatBtn.top + ChatBtn.height + 7
SysMsgBtn.top = QQMain.top
searchBtn.Top = QQMain.top
QQMain.Left = 12
SysMsgBtn.Left = GameBtn.Left
searchBtn.Left = SysMsgBtn.left + SysMsgBtn.width + 7
Window.UnLockPaint()
end sub
'上面的三个按钮
sub min1_onClick()
Window.ExeCommand 1,2
end sub
sub close1_onClick()
Window.ExeCommand 1,3
end sub
sub ColoBtn_onClick()
Window.ExeCommand 4,7
end Sub
'六个Bar按钮
Sub Window_onClick(code, Name)
Window.LockPaint()
Window.DisableBar CStr(Name)
Window.ExeCommand code,CStr(Name)
Window.UnLockPaint()
End sub
'顶部的按钮组
sub StatusBtn_onClick()
s = CStr(StatusBtn.Left + StatusBtn.width - 10)&"."&CStr(StatusBtn.Top + StatusBtn.height - 8)
Window.ExeCommand 6,s
end Sub
Sub StatusPic_onClick()
s = CStr(StatusBtn.Left + StatusBtn.width - 10)&"."&CStr(StatusBtn.Top + StatusBtn.height - 8)
Window.ExeCommand 6,s
End Sub
Sub QQMailTip_onClick()
Window.ExeCommand 7,1
End Sub
Sub QQHosting_onClick()
Window.ExeCommand 15,1
End Sub
'下面的按钮组
Sub PhoneBtn_onClick()
Window.ExeCommand 4,2
end sub
sub GameBtn_onClick()
Window.ExeCommand 4,5
end sub
sub TTBtn_onClick()
Window.LockPaint()
if NewPanels.visible = true then
NewPanels.visible = false
NewPanels.width = 3
BarFrame.left = 3
else
NewPanels.visible = true
NewPanels.width = 26
BarFrame.left = NewPanels.left + NewPanels.width - 3
end if
BarFrame.width = BG.width - BarFrame.left + 3
CellBGCenter.width = BarFrame.width - 4
CellBGTop.width = BarFrame.width - 4
CellBGBottom.width = BarFrame.width - 4
CellBGCenter.height = BarFrame.height - 4
CellBGBottom.top = CellBGCenter.top + CellBGCenter.height
CellRight.left = BarFrame.width - 2
CellRight.height = CellBGCenter.height + 2
Cellleft.height = CellRight.height
Celltopcorner.left = BarFrame.width - 5
CellRightcorner.left = Celltopcorner.left
CellRightcorner.top = BarFrame.height - 7
Cellleftcorner.top = BarFrame.height - 7
Bar1.width = BarFrame.width - 6
Window.UnLockPaint()
end Sub
sub ChatBtn_onClick()
Window.ExeCommand 4,1
end Sub
sub QQMain_onClick()
s = CStr(QQMain.Left)&"."&CStr(QQMain.Top)
Window.ExeCommand 5,s
end sub
sub SysMsgBtn_onClick()
Window.ExeCommand 4,6
end sub
sub searchBtn_onClick()
Window.ExeCommand 4,3
end sub
'处理QQ程序发来的事件
Sub Window_OnNotify(code ,var)
if code = 1 then
'设置当前的Uin
UseNum = var
MyQQNum.value = UseNum + UseStatus
elseif code = 2 then
'闪系统消息按钮 var 为1是开始闪。为2是停止
if(var = 1) then
SysMsgBtn.StopFlash
SysMsgBtn.Flash 30
else
SysMsgBtn.StopFlash
end if
elseif code = 3 then
'闪状态按钮 var 为0,1,2,3是对应的ico。为4表示停止
if var = 0 then
StatusPic.ico = "Online.ico"
elseif var = 1 Then
StatusPic.ico = "leave.ico"
elseif var = 2 Then
StatusPic.ico = "invisible.ico"
elseif var = 3 Then
StatusPic.ico = "Offline.ico"
elseif var = 4 then
StatusPic.Ico = StatusIco
end if
elseif code = 4 then
'设置那个Bar在最前
Window_onClick 2,Var
elseif code = 5 then
'设置当前的状态。
if var = 10 Then
UseStatus = "(在线)"
StatusIco = "Online.ico"
elseif var = 20 Then
UseStatus = "(离线)"
StatusIco = "Offline.ico"
elseif var = 30 Then
UseStatus = "(离开)"
StatusIco = "leave.ico"
elseif var = 40 Then
UseStatus = "(隐身)"
StatusIco = "invisible.ico"
end if
StatusPic.ico = StatusIco
MyQQNum.value = UseNum + UseStatus
elseif code = 6 then
'设置Skin的起始路径
Path = Var
elseif code = 100 then
'改变QQMail的提示
strQQMailTip = "(" + CStr(var) + ")"
QQMailTip.label = strQQMailTip
elseif code = 101 then
QQHosting.label = "(" + CStr(var) + ")"
end if
end sub
这个 |
|
|
相关文章:
·韩川版的申请机怎么设代理啊??
·那个QQ也疯狂有点不厚道.... 感觉..,. ·想问一下我的QQ里怎么好多人都未知版本0519啊? ·QQ也疯狂有什么好讨论的啊,要挂么就挂,没有条件的就别挂,有个P用啊! ·QQ保存某人的聊天记录在哪个文件 ·关于验证论坛用户 ·腾讯现在正在搞品牌满意度调查!~ ·内部消息5.1出beta2 ·不知道我这算不算新消息,QQ还有6位号码!!快去申请了哦 ·■■■我刷了很多Q币,怎么才能集中到一个帐号上去啊!■■■
|
|