发表于:2009/10/21 20:26:31
#0楼
禁止使用 alt-tab 或 ctrl-alt-del
private declare function enablewindow lib user32 (byval hwnd as integer, byval abool as integer) as integer
private declare function iswindowenabled lib user32 (byval hwnd as integer) as integer
private declare function getmenu lib user32 (byval hwnd as integer) as integer
private declare function findwindow lib user32 alias findwindowa (byval lpclassname as string, byval lpwindowname as string) as long
private declare function systemparametersinfo lib user32 alias systemparametersinfoa (byval uaction as long, byval uparam as long, byval lpvparam as any, byval fuwinini as long) as long
private taskbarhwnd as long
private istaskbarenabled as integer
private taskbarmenuhwnd as integer
禁止或允许使用 alt-tab
sub fasttaskswitching(benabled as boolean)
dim x as long, bdisabled as long
bdisabled = not benabled
x = systemparametersinfo(97, bdisabled, cstr(1), 0)
end sub
禁止使用ctrl-alt-del
public sub disabletaskbar()
dim ewindow as integer
taskbarhwnd = findwindow(shell_traywnd, )
if taskbarhwnd 0 then
ewindow = iswindowenabled(taskbarhwnd)
if ewindow = 1 then
istaskbarenabled = enablewindow(taskbarhwnd, 0)
end if
end if
end sub
允许使用ctrl-alt-del
public sub enabletaskbar()
if istaskbarenabled = 0 then
istaskbarenabled = enablewindow(taskbarhwnd, 1)
end if
end sub
禁止 ctrl+alt+del
声明:
const spi_screensaverrunning = 97
private declare function systemparametersinfo lib user32 alias _
systemparametersinfoa (byval uaction as long, byval uparam as long, _
lpvparam as any, byval fuwinini as long) as long
使用:
禁止
dim pold as boolean
call systemparametersinfo(spi_screensaverrunning, true, pold, 0)
开启
dim pold as boolean
call systemparametersinfo(spi_screensaverrunning, false, pold, 0)
----------------------------------------------
此篇文章从博客转发
原文地址: Http://blog.gkong.com/more.asp?id=103666&Name=jczwfy
private declare function enablewindow lib user32 (byval hwnd as integer, byval abool as integer) as integer
private declare function iswindowenabled lib user32 (byval hwnd as integer) as integer
private declare function getmenu lib user32 (byval hwnd as integer) as integer
private declare function findwindow lib user32 alias findwindowa (byval lpclassname as string, byval lpwindowname as string) as long
private declare function systemparametersinfo lib user32 alias systemparametersinfoa (byval uaction as long, byval uparam as long, byval lpvparam as any, byval fuwinini as long) as long
private taskbarhwnd as long
private istaskbarenabled as integer
private taskbarmenuhwnd as integer
禁止或允许使用 alt-tab
sub fasttaskswitching(benabled as boolean)
dim x as long, bdisabled as long
bdisabled = not benabled
x = systemparametersinfo(97, bdisabled, cstr(1), 0)
end sub
禁止使用ctrl-alt-del
public sub disabletaskbar()
dim ewindow as integer
taskbarhwnd = findwindow(shell_traywnd, )
if taskbarhwnd 0 then
ewindow = iswindowenabled(taskbarhwnd)
if ewindow = 1 then
istaskbarenabled = enablewindow(taskbarhwnd, 0)
end if
end if
end sub
允许使用ctrl-alt-del
public sub enabletaskbar()
if istaskbarenabled = 0 then
istaskbarenabled = enablewindow(taskbarhwnd, 1)
end if
end sub
禁止 ctrl+alt+del
声明:
const spi_screensaverrunning = 97
private declare function systemparametersinfo lib user32 alias _
systemparametersinfoa (byval uaction as long, byval uparam as long, _
lpvparam as any, byval fuwinini as long) as long
使用:
禁止
dim pold as boolean
call systemparametersinfo(spi_screensaverrunning, true, pold, 0)
开启
dim pold as boolean
call systemparametersinfo(spi_screensaverrunning, false, pold, 0)
----------------------------------------------
此篇文章从博客转发
原文地址: Http://blog.gkong.com/more.asp?id=103666&Name=jczwfy
日本人说中日友好,中国人民笑了:你丫骗谁呢?
日本人说自己爱和平,亚洲人民笑了:说的是人话吗?
日本人说自己要维护世界和平,美国人民笑了:问你大爷没?
日本人说自己是人,全世界的狗都叫了:兄弟,做狗要厚道,不能忘本!
欢迎访问我的博客http://blog.gkong.com/blog.asp?name=jczwfy
在线PLC触摸屏问题解答加Q号2*7*5*4*7*0*0*6,加好友注明工控网
日本人说自己爱和平,亚洲人民笑了:说的是人话吗?
日本人说自己要维护世界和平,美国人民笑了:问你大爷没?
日本人说自己是人,全世界的狗都叫了:兄弟,做狗要厚道,不能忘本!
欢迎访问我的博客http://blog.gkong.com/blog.asp?name=jczwfy
在线PLC触摸屏问题解答加Q号2*7*5*4*7*0*0*6,加好友注明工控网