473,387 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Ctrl + Break

How to block Crtl + Break keys if any Error or MsgBox shows ???

I tryed with this code buy it looks it does not work.

Private Sub Form_KeyPress(KeyAscii As Integer)
If Chr$(&H4) + Chr$(70) Then 'CTRL-BREAK
MsgBox "No valid option"
docmd.cancel
End If
End Sub

Can anybody help me ?
Nov 13 '05 #1
2 4116
Rather then using MsgBox, why not use your own form to display whatever
information that is currently on the MsgBox?

Nov 13 '05 #2
"Javier Gomez" <ja*****************@gmail.com> wrote in message
news:89**************************@posting.google.c om...
How to block Crtl + Break keys if any Error or MsgBox shows ???

I tryed with this code buy it looks it does not work.

Private Sub Form_KeyPress(KeyAscii As Integer)
If Chr$(&H4) + Chr$(70) Then 'CTRL-BREAK
MsgBox "No valid option"
docmd.cancel
End If
End Sub

Can anybody help me ?


Certainly you could use Chuck's suggestion of avoiding the message box
altogether, but perhaps you should explain why you need this. If you need
to prevent people seeing/editing the code then you could use a compiled mde
file which makes this impossible. If you are trying to keep out the mildly
curious amateur then you could simple select Tools>Startup and not allow
Access special keys, although this would not be as secure as the first
suggestion.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Pedro Graca | last post by:
Well ... I've been using Windows for a long time before I switched to Linux. I'm very used to type CTRL-ALT-DEL everytime I'm leaving my computer or arriving to it. It's hapenned _twice_ (in the...
2
by: s99999999s2003 | last post by:
hi i have a program that works very similar to tail -f in Unix It will need a Ctrl-C in order to break out of the program. I wish to run this program using python (either thru os.system() or some...
8
by: Christoph Haas | last post by:
Hi... I encountered a problem that - according to my google search - other people have found, too. Example code: import sys for line in sys.stdin: print line Running this code in Python...
2
by: calderara | last post by:
Dear all, What is the best way to catch the user prressig the CTRL- C key combination.. I have try the keypress ans key down event but I am able only to catch one key at a time .. Amy idea ?...
4
by: tidegenerator | last post by:
Hi; How can I know the Key c and Ctrl on the keyboard are pressed? Or how to let the program press the key Ctrl+c automatically? I just want to use python to develop a script program. gear
3
by: Daniel Clark | last post by:
I have a Windows command line based application that only shuts down cleanly if it sees "CTRL-C" on the console. I need to automate the running of this application, but still allow the user sitting...
1
by: sweetpotatop | last post by:
Hi, I got an pop-up error when I tried to run my window application. However, I have no idea which line of code is causing the problem. Is there a way to figurate that out? In VB, when I do...
3
by: zlf | last post by:
Hello I'm writing testcase for my console application. One testcase requires to test press Ctrl+C while the application is running. How to send Ctrl+C while running application through...
0
by: Andrus | last post by:
MDI WinForms 2 application. I need that Ctrl+F1 cycles through windows like Ctrl+Tab and Ctrl+Tab is redefined. I overrided MDI child form OnKeypress method but Ctrl+F1 press is ignored. For...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.