Is-it possible to lock events on a control?

I need to disabled an event on a control to do some operation is-it possible to do so?

Ex.: i want to disable the click event on a grid but not the double-click.
LVL 2
dabelleiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mark2150Connect With a Mentor Commented:
No.
0
 
traygreenCommented:
Give an example of what you're trying to do.  If you're trying to eliminate circular references, you can set a local static or form level variable and check it on entering the event.

0
 
wizard2072098Commented:
Can you be more specific? Click and Double-Click are two different windows messages, and are independent of each other. Are you actually trying to eat the message itself, so the control never even gets the message? If so, you'll have to write a hook to trap the message coming in on the queue and eat it (not too hard, but I'll reserve the example until you say that's what you need).
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
dabelleiAuthor Commented:
Ok guy.

Let see in each control we have some event (click, double-click, change...)  in the programm we're making we need to desabled one event (like change event) on one control.  Sometime we need the validation that's in the event change sometime we need to bypass it (printing a report with the data on the screen and skip the validation).  Taht's why i need to disabled one event on a control at some time.
0
 
mark2150Commented:
Have the event handler check a global boolean that is set when you want things not to happen. Encase all the code in the event in a:

IF {statevar} THEN


ENDIF

M

0
 
dabelleiAuthor Commented:
I Know this solution, what i need to know is if it is possible to disabled event.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.