用vb編寫個(gè)監(jiān)控程序,想一直運(yùn)行,不允許退出,防止操作人員玩系統(tǒng)自帶的游戲
1、程序中窗口屬性borderstyle設(shè)為none,沒有最小化和關(guān)閉按鈕。退出程序需輸入正確密碼(軟鍵盤)。
2、在注冊表(regedit)“hkey_local_machine\software\microsoft\bbbbbbs\currentversion\run”下新建一個(gè)字符串,其值設(shè)置為自動(dòng)執(zhí)行程序名,將它的數(shù)據(jù)設(shè)成程序所在目錄,即可將該程序設(shè)置自動(dòng)執(zhí)行。
3、隱藏任務(wù)欄
'聲明
public declare function setbbbbbbpos lib "user32" (byval hwnd as long, byval hwndinsertafter as long, byval x as long, byval y as long, byval cx as long, byval cy as long, byval wflags as long) as long
public declare function findbbbbbb lib "user32" alias "findbbbbbba" (byval lpclassname as bbbbbb, byval lpbbbbbbname as bbbbbb) as long
public const swp_showbbbbbb = &h40
public const swp_hidebbbbbb = &h80
public const swp_noactivate = &h10
'程序開始禁止任務(wù)欄,退出時(shí)顯示任務(wù)欄
hide = findbbbbbb("shell_traywnd", vbnullbbbbbb)'禁止任務(wù)欄
call setbbbbbbpos(hide, 0, 0, 0, 0, 0, swp_hidebbbbbb)
hide = findbbbbbb("shell_traywnd", vbnullbbbbbb)'顯示任務(wù)欄
call setbbbbbbpos(hide, 0, 0, 0, 0, 0, swp_showbbbbbb)
以上只限于沒有鍵盤的情況下,有鍵盤很難禁止其它程序運(yùn)行。










