翻译成vb 修改桌面图标名称的代码
发布网友
发布时间:2022-09-03 16:01
我来回答
共1个回答
热心网友
时间:2024-11-24 18:56
这个文章 应该适用
http://wenku.baidu.com/link?url=hEm1VFuFdNpCoc3-bvhyXhAXm4q1e_OupMH0BpODgpTPxwYxGdAC0uULXZ8dU62LgrVn_DLEpKiFL6A1bh4Hhxo5xbmCME8RjZUR__4asR_
'通过三步查找到放置桌面图表的窗口
hWindow = FindWindow("Progman", "Program Manager")
hWindow = FindWindowEx(hWindow, 0, "SHELLDLL_DefView", "")
hWindow = FindWindowEx(hWindow, 0, "SysListView32", "")
If bTrans Then '透明背景
SendMessage hWindow, LVM_SETTEXTBKCOLOR, 0, &HFFFFFFFF
Else '非透明背景
SendMessage hWindow, LVM_SETTEXTBKCOLOR, 0, clBack
End If
'设置图标文字的颜色
SendMessage hWindow, LVM_SETTEXTCOLOR, 0, clFore
'重新绘制所有的图标
lItemCount = SendMessage(hWindow, LVM_GETITEMCOUNT, 0, 0)
SendMessage hWindow, LVM_REDRAWITEMS, 0, lItemCount - 1
'更新窗口
UpdateWindow hWindow
End Sub