Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

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.
0
dabellei
Asked:
dabellei
1 Solution
 
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
 
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
mark2150Commented:
No.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now