以vbs增加工具条窗体实现网络搜索等功能
在http://www.brsbox.com/ygy7876网盘中下载"gjtct.rar",解压后双击gjtct.frm文件便可导入gjtct.窗体
网盘中有:"stk制作控制台工具条的说明.pdf "和"STK制作控制台工具条的说明.CHM "可以看考
工具条窗体中全部代码:
Sub APPLICATION_VBAStart() '初始化UserForm2窗体
gjtct.show
gjtct.Move 320,-28,53,450
End Sub
Sub gjtct_Click() ' 单击窗体时展开窗体
call gjtct.Move (320,-28,200,450)
End Sub
Sub gjtct_DblClick(Cancel) '双击窗体时收缩窗体
call gjtct.Move (320,-28,53,450)
End Sub
Sub gjtct_Load() '加载窗体时显示最大和最小按钮
gjtct.MinButton=1
gjtct.MaxButton=1
End Sub
Sub gjtct_CommandButton1_Click()
dim Label
dim Market
Result = Application.GetCurrentStock(Label,Market)
if Result = 0 then
msgbox "请选择一个品种"
exit sub
end if
call Application.ShellExecute ("open", "http://www.windin.com/home/stock/html/"&Label&"."&Market&".shtml?&t=1&q="&Label, "", "", 1 )
End Sub
Sub gjtct_CommandButton2_Click()
dim Label
dim Market
Result = Application.GetCurrentStock(Label,Market)
if Result = 0 then
msgbox "请选择一个品种"
exit sub
end if
call Application.ShellExecute ("open", "http://profile.10jqka.com.cn/GenBase/"&Label&".html", "", "", 1 ) '巨灵F10
End Sub
Sub gjtct_CommandButton3_Click()
dim Label
dim Market
Result = Application.GetCurrentStock(Label,Market)
if Result = 0 then
msgbox "请选择一个品种"
exit sub
end if
call Application.ShellExecute ("open", "http://guba.eastmoney.com/"&Label&",guba.html", "", "", 1 ) '东方财富股吧
End Sub
Sub gjtct_CommandButton4_Click() '搜狗新闻搜索
dim Label
dim Market
Result = Application.GetCurrentStock(Label,Market)
if Result = 0 then
msgbox "请选择一个品种"
exit sub
end if
call Application.ShellExecute ("open", "http://news.sogou.com/news?query="&Label&"", "", "", 1 )
End Sub
Sub gjtct_CommandButton5_Click()
Application.WinExec "E:\dzh2\大智慧新一代.exe", 1
End Sub
Sub gjtct_CommandButton7_Click()
dim Label
dim Market
Result = Application.GetCurrentStock(Label,Market)
if Result = 0 then
msgbox "请选择一个品种"
exit sub
end if
Set objIE = CreateObject("InternetExplorer.Application") '调用MSie的剪贴板实现复制股票代码
objIE.Navigate("about:blank")
objIE.document.parentwindow.clipboardData.SetData "text", Label
objIE.Quit
msgbox "已成功将"&Market&Label&"复制到粘贴板"
End Sub
图片看不到。
建议使用 http://tinypic.com/ 贴图,然后复制链接过来