Click here to Skip to main content
15,891,777 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help me out please!! Pin
Niiiissssshhhhhuuuuu27-Sep-06 19:18
Niiiissssshhhhhuuuuu27-Sep-06 19:18 
Questionget data from a website - need help Pin
dinhzap27-Sep-06 18:09
dinhzap27-Sep-06 18:09 
AnswerRe: get data from a website - need help Pin
Christian Graus27-Sep-06 18:24
protectorChristian Graus27-Sep-06 18:24 
GeneralRe: get data from a website - need help Pin
dinhzap28-Sep-06 0:20
dinhzap28-Sep-06 0:20 
QuestionToo many MachineKeys ? Pin
Guinness4Strength27-Sep-06 17:23
Guinness4Strength27-Sep-06 17:23 
Questionthemes and master forms Pin
Harikrk27-Sep-06 16:09
Harikrk27-Sep-06 16:09 
AnswerRe: themes and master forms Pin
Nader Elshehabi27-Sep-06 18:45
Nader Elshehabi27-Sep-06 18:45 
QuestionHow to disable the Form capture? Pin
Rojan Gh.27-Sep-06 14:10
professionalRojan Gh.27-Sep-06 14:10 
Hi guys!
Does anyone know, how to disable the Capture action of the form?
Whenever I move the mouse on the form, it reports the Capture property as , but when I press the mouse button, it changes to true!
I have added a MessageFilter to my Application object, and I want to do this:
public bool PreFilterMessage(ref Message m)
            {
                if (m.Msg == WM_NCLBUTTONDOWN)//WM_NCLBUTTONDOWN = 0xA1
                {
                    //Tell the user that, the mouse pressed
                    //the window title bar.
                    return false;
                }
                else if (m.Msg == WM_NCLBUTTONUP)//WM_NCLBUTTONUP = 0xA2
                {
                    //Tell the user that, mouse released
                    //on the window title bar.
                    return false;
                }
                return false;
            }

The Press Message is sent to the Application object correctly, but as the MSDN documents tell:
The WM_NCLBUTTONUP message is posted when the user releases the
left mouse button while the cursor is within the nonclient area of a window.
This message is posted to the window that contains the cursor.
<big><code>If a window has captured the mouse, this message is not posted.</code></big>

the Release Message is not sent to the Application object, but if I change it to this:
public bool PreFilterMessage(ref Message m)
            {
                if (m.Msg == WM_NCLBUTTONDOWN)//WM_NCLBUTTONDOWN = 0xA1
                {
                    //Tell the user that, the mouse pressed
                    //the window title bar.
                    <code>return true;</code>
                }
                else if (m.Msg == WM_NCLBUTTONUP)//WM_NCLBUTTONUP = 0xA2
                {
                    //Tell the user that, mouse released
                    //on the window title bar.
                    return false;
                }
                return false;
            }

because of that, the press messsage has been ignored and so the Capture action is not started, the message will be sent correctly, but I don't want to ignore the first message and I also want the second message, and so I have to find a way to disable the Capture action of the form!

Help please!Frown | :(

Sojaner!Rose | [Rose]

AnswerRe: How to disable the Form capture? Pin
Nader Elshehabi27-Sep-06 14:35
Nader Elshehabi27-Sep-06 14:35 
GeneralRe: How to disable the Form capture? Pin
Rojan Gh.27-Sep-06 14:53
professionalRojan Gh.27-Sep-06 14:53 
GeneralRe: How to disable the Form capture? Pin
Nader Elshehabi27-Sep-06 15:00
Nader Elshehabi27-Sep-06 15:00 
GeneralRe: How to disable the Form capture? Pin
Rojan Gh.27-Sep-06 15:12
professionalRojan Gh.27-Sep-06 15:12 
QuestionRe: How to disable the Form capture? Pin
Nader Elshehabi27-Sep-06 15:18
Nader Elshehabi27-Sep-06 15:18 
AnswerRe: How to disable the Form capture? Pin
Rojan Gh.27-Sep-06 15:33
professionalRojan Gh.27-Sep-06 15:33 
GeneralRe: How to disable the Form capture? Pin
Nader Elshehabi27-Sep-06 16:00
Nader Elshehabi27-Sep-06 16:00 
GeneralRe: How to disable the Form capture? [modified] Pin
Rojan Gh.27-Sep-06 16:18
professionalRojan Gh.27-Sep-06 16:18 
GeneralRe: How to disable the Form capture? Pin
Nader Elshehabi27-Sep-06 16:24
Nader Elshehabi27-Sep-06 16:24 
GeneralRe: How to disable the Form capture? Pin
Rojan Gh.27-Sep-06 16:35
professionalRojan Gh.27-Sep-06 16:35 
AnswerRe: How to disable the Form capture? Pin
Nader Elshehabi27-Sep-06 18:38
Nader Elshehabi27-Sep-06 18:38 
GeneralRe: How to disable the Form capture? Pin
Rojan Gh.28-Sep-06 4:05
professionalRojan Gh.28-Sep-06 4:05 
GeneralRe: How to disable the Form capture? Pin
Nader Elshehabi28-Sep-06 4:16
Nader Elshehabi28-Sep-06 4:16 
AnswerRe: How to disable the Form capture? Pin
Rojan Gh.28-Sep-06 8:23
professionalRojan Gh.28-Sep-06 8:23 
QuestionWeb Aplication learning with ASP.NET Pin
unitecsoft27-Sep-06 12:25
unitecsoft27-Sep-06 12:25 
AnswerRe: Web Aplication learning with ASP.NET Pin
Christian Graus27-Sep-06 12:55
protectorChristian Graus27-Sep-06 12:55 
AnswerRe: Web Aplication learning with ASP.NET Pin
Nader Elshehabi27-Sep-06 14:04
Nader Elshehabi27-Sep-06 14:04 

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.