Solved

Catch the calls

Posted on 1998-08-13
6
196 Views
Last Modified: 2010-04-30
Can anyone please tell me how to do two things the first is :- the code or a way to catch the call that stops the user from closing you app with ctrl-alt-delete, not disable ctrl-atl-delete.

The second is catch the call to stop a program closing when the log-off option is used, the user should be able to log-off but the program should not close.

Hope you can help, Peat.
0
Comment
Question by:peat042998
6 Comments
 
LVL 6

Expert Comment

by:anthonyc
ID: 1468766
HAHAHAHHAHAHAHHAHAH for 25 points too.. of course.
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1468767
What you need to stop the user from closing your app is in the QueryUnload event of your form:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

  If UnloadMode = vbAppWindows Or UnloadMode = vbAppTaskManager Then
    Cancel = True
  End If
End Sub

The second option isn't possible.
0
 

Author Comment

by:peat042998
ID: 1468768
anthonyc : it looks like you know the answer, 25 points was all I had when I posted the question.  I can up it to 100 if you can give an answer that works.  

And if you or anyone else have answers for both parts (answers that work) I will up the points to 150.

Another way which could answer part of this question is not to catch the call for the C-A-D but to take my apps entry alway from the C-A-D list.

I still need to know how to catch the call to stop a program closing when the log-off option is used, the user should be able to log-off but the program should not close.

This is very important and needed quickly the first person to give the answers that that work will get the points.

Thanks and I hope someone can help.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:peat042998
ID: 1468769
sorry clifABB that didn't work.
0
 
LVL 2

Accepted Solution

by:
bernfarr earned 20 total points
ID: 1468770
Look at the article:
  http://support.microsoft.com/support/kb/articles/q154/8/68.asp

I think this answers your question with regard to Ctrl-Alt-Delete. I believe that it will also work for programs being closed down due to logoff.
0
 
LVL 2

Expert Comment

by:bernfarr
ID: 1468771
You might also find the article:
  http://support.microsoft.com/support/kb/articles/q114/7/76.asp

It shows how to hide a VB program from the task list.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now