您的位置:程序门 -> vb -> 基础类



如何隐藏windows vista的开始图标?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何隐藏windows vista的开始图标?[已结贴,结贴人:chenjl1031]
发表于:2007-09-14 15:10:05 楼主
我编写了一个程序,隐藏桌面图标和开始图标,windows   2000和xp下能行,但在windows   vista下对开始图标不起作用。请问应该如何隐藏windows   vista的开始图标?
发表于:2007-09-14 19:46:131楼 得分:20
试试这段代码(稍微修改下就可以)

const   ws_child   =   &h40000000
const   wm_lbuttondown   =   &h201
const   wm_lbuttonup   =   &h202
const   sw_hide   =   0
const   sw_normal   =   1
private   type   rect
        left   as   long
        top   as   long
        right   as   long
        bottom   as   long
end   type
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
private   declare   function   findwindow   lib   "user32 "   alias   "findwindowa "   (byval   lpclassname   as   string,   byval   lpwindowname   as   string)   as   long
private   declare   function   showwindow   lib   "user32 "   (byval   hwnd   as   long,   byval   ncmdshow   as   long)   as   long
private   declare   function   getwindowrect   lib   "user32 "   (byval   hwnd   as   long,   lprect   as   rect)   as   long
private   declare   function   createwindowex   lib   "user32 "   alias   "createwindowexa "   (byval   dwexstyle   as   long,   byval   lpclassname   as   string,   byval   lpwindowname   as   string,   byval   dwstyle   as   long,   byval   x   as   long,   byval   y   as   long,   byval   nwidth   as   long,   byval   nheight   as   long,   byval   hwndparent   as   long,   byval   hmenu   as   long,   byval   hinstance   as   long,   lpparam   as   any)   as   long
private   declare   function   destroywindow   lib   "user32 "   (byval   hwnd   as   long)   as   long
dim   twnd   as   long,   bwnd   as   long,   ncwnd   as   long
private   sub   form_load()
        dim   r   as   rect
        twnd   =   findwindow( "shell_traywnd ",   vbnullstring)
        bwnd   =   findwindowex(twnd,   byval   0&,   "button ",   vbnullstring)
        getwindowrect   bwnd,   r
        ncwnd   =   createwindowex(byval   0&,   "button ",   "start ",   ws_child,   0,   0,   r.right   -   r.left,   r.bottom   -   r.top,   twnd,   byval   0&,   app.hinstance,   byval   0&)
        showwindow   ncwnd,   sw_normal
        showwindow   bwnd,   sw_hide
end   sub
private   sub   form_unload(cancel   as   integer)
        showwindow   bwnd,   sw_normal
        destroywindow   ncwnd
end   sub


发表于:2007-10-01 17:32:522楼 得分:0
挺复杂的嘛


快速检索

最新资讯
热门点击