 |
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: Disable Window Key
Win9x tell the OS that a screensaver's running (code exists elsewhere on the board).
NT->I believe requires some system editing (registry changes), unless your trying to create a program to completely lock down a system (like for a demo PC in a store), it's not easy. As a note, even games that have a disable windows key, it doesn't always work, and it's coded in C.
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
11-03-2003 at 09:51 PM |
|
|
vbgen Level: Moderator
 Registered: 10-10-2002 Posts: 876
|
Re: Disable Window Key
hello, noycez...
again, to clear things up, i created my signature below..
i've tried this on win98, and it works like a charm....
when you load your program and do the ctrl+alt+del thing...
(if you've found an alternative for win2k already)
use the two subs on load and unload...
load: hidetaskbar
unload: showtaskbar
i would suggest that if you intend to do the maximization of the form's size, try to start first with making the taskbar autohide, so your screen won't look a bit disturbing...
you'll see what i mean when you try without the autohide.
here's the code...
Option Explicit
'for hiding and showing the taskbar
Private TaskBarhWnd As Long
Private Const SWP_SHOWWINDOW = &H40
Private Const SWP_HIDEWINDOW = &H80
Private Declare Function SetWindowPos 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
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long
'------------------------------------------------------
'hide the taskbar to secure the pc from unauthorized access
Public Sub HideTaskBar()
TaskBarhWnd = FindWindow("Shell_traywnd", "")
If TaskBarhWnd <> 0 Then
Call SetWindowPos(TaskBarhWnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End If
End Sub
'------------------------------------------------------
'shows the taskbar when accessible due to user level
Public Sub ShowTaskBar()
If TaskBarhWnd <> 0 Then
Call SetWindowPos(TaskBarhWnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End If
End Sub |
again, i hope this'll help you with your win2k
____________________________
Been busy trying to take a second degree <--it's not working out...
|
|
14-03-2003 at 04:45 PM |
|
|
|
|
 |
 |