Mengaktifkan/nonaktifkan Fungsi Ctrl-Alt-Del

Mengaktifkan/menonaktifkan Fungsi Tombol Ctrl-Alt-Del
Persiapan: 1. Buat 1 Form, 1 Module, dan 2 Commandbutton.
2. Copy-kan coding berikut ke dalam editor Module dan Form yang bertalian.

‘— Coding berikut ini di Module Anda…
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
‘— Batas coding di Module…

‘— Coding berikut ini di Form Anda…
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim x As Long
x = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub

Private Sub Command2_Click()
DisableCtrlAltDelete (False) ‘Enable-kan fungsi Ctrl-Alt-Del
End Sub

Private Sub Command1_Click()
DisableCtrlAltDelete (True) ‘Disable-kan fungsi Ctrl-Alt-Del
End Sub
‘— Batas coding di Form…

oleh : Masino Sinaga (masino_sinaga@posindonesia.co.id)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: