公告:

毕业五年,一切如走马观灯、过眼烟云,如梦境般似真亦幻,当年的豪言壮语已随风飘逝,本我、自我、超我不断碰撞,最后只剩下一具缺乏灵魂的僧侣,一生被定格在那个片段,固定的作息、固定的生活、固定的朋友,不知千年的轮回,是否只为这一生孤寂的宿命。

模拟桌面刷新代码

Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long


Private Declare Function FindWindowEx Lib "user32" _
    Alias "FindWindowExA" (ByVal hWnd1 As Long, _
    ByVal hWnd2 As Long, ByVal lpsz1 As String, _
    ByVal lpsz2 As String) As Long
    Const WM_KEYDOWN = &H100

Public Sub RefreshDesktop()
    Dim DeskWin As Long
    DeskWin = FindWindowEx(0&, 0&, "Progman", vbNullString)
    DeskWin = FindWindowEx(DeskWin, 0&, "SHELLDLL_DefView", vbNullString)
    DeskWin = FindWindowEx(DeskWin, 0&, "SysListView32", vbNullString)
    PostMessage DeskWin, WM_KEYDOWN, &H74, &H3F0001
End Sub




评论: 27 | 引用: 0 | 查看次数: 15246
回复回复444860990[2009-04-30 10:48 PM | del]
Const WM_KEYDOWN = &H100

Public Sub RefreshDesktop()
    Dim DeskWin As Long
    DeskWin = FindWindowEx(0&, 0&, "Progman", vbNullString)
    DeskWin = FindWindowEx(DeskWin, 0&, "SHELLDLL_DefView", vbNullString)
    DeskWin = FindWindowEx(DeskWin, 0&, "SysListView32", vbNullString)
    PostMessage hgh
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭