Solved

Catch the calls

Posted on 1998-08-13
6
197 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 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

25 Experts available now in Live!

Get 1:1 Help Now