Click here to Skip to main content
16,005,038 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help: checking a variable against a string ignoring case senstivity. Pin
Luc Pattyn4-Jun-07 12:36
sitebuilderLuc Pattyn4-Jun-07 12:36 
GeneralRe: Help: checking a variable against a string ignoring case senstivity. Pin
jblouir4-Jun-07 12:42
jblouir4-Jun-07 12:42 
GeneralRe: Help: checking a variable against a string ignoring case senstivity. Pin
Brady Kelly4-Jun-07 23:21
Brady Kelly4-Jun-07 23:21 
AnswerRe: Help: checking a variable against a string ignoring case senstivity. Pin
Hesham Yassin4-Jun-07 22:39
Hesham Yassin4-Jun-07 22:39 
QuestionField Names being shorted Pin
(Steven Hicks)n+14-Jun-07 11:46
(Steven Hicks)n+14-Jun-07 11:46 
Questionhelp me with tapi 3 call status and tone detection Pin
georgishelpmegodtoo4-Jun-07 11:17
georgishelpmegodtoo4-Jun-07 11:17 
AnswerRe: help me with tapi 3 call status and tone detection Pin
Dave Kreskowiak4-Jun-07 16:54
mveDave Kreskowiak4-Jun-07 16:54 
GeneralRe: help me with tapi 3 call status and tone detection Pin
georgishelpmegodtoo5-Jun-07 0:07
georgishelpmegodtoo5-Jun-07 0:07 
GeneralRe: help me with tapi 3 call status and tone detection Pin
Dave Kreskowiak6-Jun-07 16:32
mveDave Kreskowiak6-Jun-07 16:32 
GeneralRe: help me with tapi 3 call status and tone detection Pin
georgishelpmegodtoo7-Jun-07 1:28
georgishelpmegodtoo7-Jun-07 1:28 
GeneralRe: help me with tapi 3 call status and tone detection Pin
Dave Kreskowiak7-Jun-07 13:39
mveDave Kreskowiak7-Jun-07 13:39 
AnswerRe: help me with tapi 3 call status and tone detection Pin
Muammar©4-Jun-07 21:14
Muammar©4-Jun-07 21:14 
AnswerRe: help me with tapi 3 call status and tone detection Pin
Nouman Bhatti5-Jun-07 2:03
Nouman Bhatti5-Jun-07 2:03 
GeneralRe: help me with tapi 3 call status and tone detection Pin
georgishelpmegodtoo7-Jun-07 1:29
georgishelpmegodtoo7-Jun-07 1:29 
GeneralRe: help me with tapi 3 call status and tone detection Pin
Nouman Bhatti7-Jun-07 20:55
Nouman Bhatti7-Jun-07 20:55 
QuestionGet highlighted text from any window with special shortcut Pin
mgiaco824-Jun-07 10:34
mgiaco824-Jun-07 10:34 
AnswerRe: Get highlighted text from any window with special shortcut Pin
mgiaco825-Jun-07 2:20
mgiaco825-Jun-07 2:20 
Question[Message Deleted] Pin
R_L_H4-Jun-07 10:27
R_L_H4-Jun-07 10:27 
AnswerRe: How Do You Disable All Click Events For A .Net Control? Pin
Dave Kreskowiak4-Jun-07 10:42
mveDave Kreskowiak4-Jun-07 10:42 
AnswerRe: How Do You Disable All Click Events For A .Net Control? Pin
Ian Shlasko4-Jun-07 10:49
Ian Shlasko4-Jun-07 10:49 
General[Message Deleted] Pin
R_L_H4-Jun-07 10:53
R_L_H4-Jun-07 10:53 
GeneralRe: How Do You Disable All Click Events For A .Net Control? Pin
Ian Shlasko4-Jun-07 12:00
Ian Shlasko4-Jun-07 12:00 
GeneralRe: How Do You Disable All Click Events For A .Net Control? Pin
Dave Kreskowiak4-Jun-07 14:00
mveDave Kreskowiak4-Jun-07 14:00 
I checked out that link. If I understand what you're getting at, you're capturing the window message for button down and stuff, essentially just intercepting the messages and stopping them from being dispatched.

We've both done the same thing but from different ends. Both methods havae their pros and cons.

First, in my method, I'm not stopping the mouse message, just stopping the event from firing once the message is dispatched. The upside is it's very little code, being done in about a minute. The down side is that if you have multiple controls, you'd have to do this for each control. But, again on the upside, this makes the controls reusable in other applications without any kind of outside support, like another panel.

In your method, you can use any controls you want, making the method quite flexible without having to modify any controls, save the panel control! The downside is that it's an all-or-nothing solution. You cannot turn off the click, or other events, for just some of the controls and leave it up for the rest. This could cause a problem if different control types have varying requirements for use of the mouse, or other events.

The other downside to this method is embedding a child modifiedpanel into a larger modifiedpanel. If the larger container panel is "ReadOnly", the mous messages won't get down to the child modifiedpanel that you might want to NOT be "ReadOnly". The opposite situation does work though. The parent panel can be Read/Write while the child panel can be ReadOnly.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: How Do You Disable All Click Events For A .Net Control? Pin
Ian Shlasko5-Jun-07 2:52
Ian Shlasko5-Jun-07 2:52 
Questionhow to check free space on disk using FTP client? Pin
wojti4-Jun-07 9:58
wojti4-Jun-07 9:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.