ZENO
asked on
disabling ctrl+alt+del in windows-95
How can i disable the ctrl+alt+del combination in windows-95 .That is when a user presses this combination he gets a dialog box from where he can terminate any process. I don't want this to happen?can any body help me.I want the souurce code in visual basic using API functions.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Adjusted points to 60
ZENO,
Here is the code for Hide the App from the task bar.
(This uses notepad as example. You need to change it to your app).
You should have a lot more point than that. You should have at least 280 points by now. If you don't, post a question in the costomer service area and ask linda to look at your account.
Regards
Dalin
Here is the code for Hide the App from the task bar.
(This uses notepad as example. You need to change it to your app).
You should have a lot more point than that. You should have at least 280 points by now. If you don't, post a question in the costomer service area and ask linda to look at your account.
Regards
Dalin
ASKER
you did not give the code.I am readjusting the points to 75 .Please do send me the code.
Bye
zeno
Bye
zeno
Zeno
Sorry, I must have forgetting to paste the code. Did not mean to delay.
Regards
Dalin
'Declarations
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
Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
'Code to Hide the Taskbar
Dim Thwnd as Long
Thwnd = FindWindow("Shell_traywnd" , "")
Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
'Code to Show the Taskbar
Dim Thwnd as Long
Thwnd = FindWindow("Shell_traywnd" , "")
Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
Sorry, I must have forgetting to paste the code. Did not mean to delay.
Regards
Dalin
'Declarations
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
Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
'Code to Hide the Taskbar
Dim Thwnd as Long
Thwnd = FindWindow("Shell_traywnd"
Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
'Code to Show the Taskbar
Dim Thwnd as Long
Thwnd = FindWindow("Shell_traywnd"
Call SetWindowPos(Thwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
ASKER
this code hides the whole of taskbar idont want that i just want my application that is word to not appear on the taskbar whereas the remaining application continue to do so.I have increased the points to 80.Thank you
Zeus
Zeus
Sorry...
Here is the code to hide your app from the task bar
Regards
DAlin
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOZORDER = &H4
Public Const SWP_NOREDRAW = &H8
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_HIDEWINDOW = &H80
Public Const MAX_LENGTH = 1024
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
Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal LParam As Long) As Long
Public Function EnumWindowProc(ByVal hWnd As Long, ByVal Param As Long) As Long
Dim sName As String
sName = Space(MAX_LENGTH)
If GetClassName(hWnd, sName, MAX_LENGTH) <> 0 Then
If Left$(sName, InStr(sName, vbNullChar) - 1) = "Notepad" Then
SetWindowPos hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOZORDER Or SWP_NOACTIVATE Or
SWP_HIDEWINDOW
End If
End If
EnumWindowProc = 1
End Function
Private Function HideWindow()
EnumWindows AddressOf EnumWindowProc, 0
End Function
Here is the code to hide your app from the task bar
Regards
DAlin
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOZORDER = &H4
Public Const SWP_NOREDRAW = &H8
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_HIDEWINDOW = &H80
Public Const MAX_LENGTH = 1024
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
Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal LParam As Long) As Long
Public Function EnumWindowProc(ByVal hWnd As Long, ByVal Param As Long) As Long
Dim sName As String
sName = Space(MAX_LENGTH)
If GetClassName(hWnd, sName, MAX_LENGTH) <> 0 Then
If Left$(sName, InStr(sName, vbNullChar) - 1) = "Notepad" Then
SetWindowPos hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOZORDER Or SWP_NOACTIVATE Or
SWP_HIDEWINDOW
End If
End If
EnumWindowProc = 1
End Function
Private Function HideWindow()
EnumWindows AddressOf EnumWindowProc, 0
End Function
ASKER
Thanks for your answer.I found abetter way infact which does not require this much of code.that is by searching for the window using findwindow api with parameters of vbnullstring and name of window and once you get the handle of window you hide it from the taskbar.
Thanks anyway...
Zeus
Thanks anyway...
Zeus
ASKER
Thank you.I will increase the points to 59.Thats all the points I have got.
Bye and thank you once again...
Zeus.