VB 版 (精华区)
发信人: zxfsnow (别怕我伤心), 信区: VB
标 题: 如何在"开始"菜单中添加自定义的子菜单
发信站: 哈工大紫丁香 (2000年05月31日20:00:11 星期三), 转信
发信人: ming (继续睡觉..zzZZ), 信区: VB
标 题: 如何在"开始"菜单中添加自定义的子菜单
发信站: 虎踞龙盘东南站 (Mon Feb 14 13:32:06 2000), 转信
发信人: erain (红花会主), 信区: VisualBasic
标 题: 如何在"开始"菜单中添加自定义的子菜单
发信站: BBS 水木清华站 (Thu Jan 6 09:20:41 2000) WWW-POST
This code adds an item to the 'Document' submenu in the Start-menu. Simply
add the code to a module, and call the sub like this:
AddRecent "C:\myfile.txt"
Please note that the item probably won't show up on the menu immediately, at
least it doesn't on my computer. It takes about 10-20 seconds for it to get
there.
If you want to clear the menu, just pass an empty string to the sub, like
this:
AddRecent ""
Paste the following code into a module:
'//*********************************//'
Public Const SHARD_PATH = &H2&
Public Declare Function SHAddToRecentDocs Lib "shell32.dll" (ByVal dwFlags As
Long, ByVal dwData As String) As Long
Public Sub AddRecent(strFile As String)
Dim lRetVal As Long
If strFile = "" Then
lRetVal = SHAddToRecentDocs(SHARD_PATH, vbNullString)
Else
lRetVal = SHAddToRecentDocs(SHARD_PATH, strFile)
End If
End Sub
--
巧者劳而智者忧,无能者无所求,饱食而遨游,泛若不系之舟。
请稍候,正在返璞归真中......
__________________________________________________________________
||||||||||| 20% |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
每一刻都存在,不一样的精彩
--
以科计为本,以产业报国!
超越自我,飞跃无限!
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 202.118.235.249]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.714毫秒