|
-
Jun 23rd, 2000, 10:26 PM
#1
Thread Starter
Junior Member
Hello!
I did a lot of things to secure my application from shutting off, like CTRL+ALT+DEL tip, ALT+F4 etc, but one problem still exist. I found out that any VB app can be shutted off with the following combination: Press ALT+F6 then still holding ALT key press F4. Does anyone know how to solve this problem?
Thank you!
Emi
-
Jun 23rd, 2000, 10:29 PM
#2
Frenzied Member
Not many people know about that combination
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 09:41 AM
#3
PowerPoster
Put some magic in the QueryUnload Events
You must detect the unload mode under the QueryUnload events:
Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'This will cause the application will only unload when is call by the VB code.
'Example:
'Private Sub Command1_Click()
' End
'End Sub
If UnloadMode <> vbFormCode Then Cancel = 1
End Sub
-
Jun 24th, 2000, 10:02 AM
#4
Hyperactive Member
Nothing is immune to Ctrl+Alt+Del
There is no possible way (known to me) to make an application which can't be shutted down by the user. Theres always the Ctrl+Alt+Del method, if running Windows 95 or 98 then you can just use something like WinTop32.exe (comes with Power Toys which is free from Microsoft) which shows all processes running where you can terminate whichever you want. I NT, nothing beats the Task Manager.
You could try to name the project it something that looks like a system process: Udpsvr32.exe
The only way is to compile a vxd which would be loaded at the startup of windows, for instance, so this can't be shut down. But it's kind of difficult with vb, (just for not saying impossible).
Signed, Rodik ([email protected])
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
-
Jun 24th, 2000, 10:25 AM
#5
transcendental analytic
YOu can hehe, avoid that too, if you cancel the shutdown progress, and you can make it not shown in ctrl+alt+del list. But anyway you can't avoid someone pressing reset, ok maybe, but you can't avoid someone turning off the power, ok maybe but you can't avoid someone pulling the plug!
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 24th, 2000, 10:32 AM
#6
Frenzied Member
acctullay it is possible, I saw it done before
what happens is that it takes 2 seconds for the power to go off completely after you pull the plug. So it takes 1 second for the program to fiqure out about the loss of power, and it copies (or deleted, not sure) a samll file to the computer and then windows doesn't work
NXSupport - Your one-stop source for computer help
-
Jun 24th, 2000, 10:36 PM
#7
PowerPoster
Re: Nothing is immune to Ctrl+Alt+Del
Originally posted by Rodik
There is no possible way (known to me) to make an application which can't be shutted down by the user. Theres always the Ctrl+Alt+Del method, if running Windows 95 or 98 then you can just use something like WinTop32.exe (comes with Power Toys which is free from Microsoft) which shows all processes running where you can terminate whichever you want. I NT, nothing beats the Task Manager.
You could try to name the project it something that looks like a system process: Udpsvr32.exe
The only way is to compile a vxd which would be loaded at the startup of windows, for instance, so this can't be shut down. But it's kind of difficult with vb, (just for not saying impossible).
Hi dimava,
If you talking about the Task Manager in win9x platform, I've some code which can made your application invisible from the Task Manager. So it is totally made your application can't shut down by the user without a proper procedure that you've define in your application itself.
Code:
Option Explicit
Dim pid As Long
Dim reserv As Long
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Private Const RSP_SIMPLE_SERVICE = 1
Private Const RSP_UNREGISTER_SERVICE = 0
Private Sub Command1_Click()
'Hide your program from the Task Manager list
pid = GetCurrentProcessId()
reserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub
Private Sub Command2_Click()
'Unhide your program from the Task Manager list
pid = GetCurrentProcessId()
reserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|