以下是引用片段: private declare function getsystemmenu lib 'user32' (byval hwnd as long, byval brevert as long) as long private declare function removemenu lib 'user32' (byval hmenu as long, byval nposition as long, byval wflags as long) as long private declare function drawmenubar lib 'user32' (byval hwnd as long) as long private declare function getmenuitemcount lib 'user32' (byval hmenu as long) as long private const mf_byposition = &h400& private const mf_disabled = &h2& private sub form_load() call disablex(me) end sub private sub disablex(frm as form) dim hmenu as long, ncount as long hmenu = getsystemmenu(frm.hwnd, 0) ncount = getmenuitemcount(hmenu) call removemenu(hmenu, ncount - 1, mf_disabled or mf_byposition) drawmenubar frm.hwnd end sub |
下一篇:计算机二级VB编程:用Winrar压缩文件 一、shell函数
shell函数是vb中的内部函数,它负责执行一个可执行文件,返回一个variant(double),如果成功的话,代表这个程序的进程id,若不成功,则会返回0。
shell的语法:shell(pathname[,windowstyle])。
pathname 为必需参数。类型为string,它指出了要执行的程序名,以及任何需要的参数或命令行变量,也可以包括路径名。
windowstyle为可选参数。integer类型,指定在程序运行时窗口的样式。windowstyle有以下这些值。
常量 值 描述
vbhide 0 窗...[查看详情] |