Click here to Skip to main content
15,910,277 members
Home / Discussions / C#
   

C#

 
AnswerRe: Abort or Stop Thread using c# Pin
0x3c012-Aug-09 22:57
0x3c012-Aug-09 22:57 
QuestionCustom Event and Cross-thread operation not valid Question Pin
Programm3r12-Aug-09 21:22
Programm3r12-Aug-09 21:22 
AnswerRe: Custom Event and Cross-thread operation not valid Question Pin
N a v a n e e t h13-Aug-09 1:25
N a v a n e e t h13-Aug-09 1:25 
QuestionRe: Custom Event and Cross-thread operation not valid Question Pin
Programm3r13-Aug-09 1:35
Programm3r13-Aug-09 1:35 
Questioninvoking events of a control under another control Pin
jamesjk12-Aug-09 20:27
jamesjk12-Aug-09 20:27 
AnswerRe: invoking events of a control under another control Pin
Eslam Afifi12-Aug-09 21:34
Eslam Afifi12-Aug-09 21:34 
GeneralRe: invoking events of a control under another control Pin
jamesjk13-Aug-09 0:02
jamesjk13-Aug-09 0:02 
GeneralRe: invoking events of a control under another control Pin
Eslam Afifi13-Aug-09 18:05
Eslam Afifi13-Aug-09 18:05 
What you need is to send a mouse button down message when the mouse is down, mouse move when the mouse is moving and mouse up when the mouse is up. You can experiment to be sure of the message sequence when dragging happens by creating a dummy custom control (or form) with some code similar to the following and figure out the proper message sequence that is generated when you do dragging with it.
protected override void WndProc(ref Message m)
{
    Debug.WriteLine(m.ToString()); // writes to the output window of visual studio when debugging a debugging build
    base.WndProc(ref m);
}

Use this list[^] to facilate analyzing the messages.
Then you can send the appropriate message(s) in the proper event.
By the way, don't send messages with lParam and wParam as IntPtr.Zero since they are supposed to hold modifier keys and mouse coordinates, which you need to make the covered control calculate the distance, otherzise it would calculate zero or some other wrong value since you're notifying it that is the mouse is currently at position (0, 0). See the msdn documentation of WM_LBUTTONDown... to know what to pass to lParam and wParam.

Eslam Afifi

GeneralRe: invoking events of a control under another control Pin
jamesjk13-Aug-09 22:05
jamesjk13-Aug-09 22:05 
GeneralRe: invoking events of a control under another control Pin
Eslam Afifi14-Aug-09 2:58
Eslam Afifi14-Aug-09 2:58 
AnswerRe: invoking events of a control under another control Pin
kb-boxer13-Aug-09 1:00
kb-boxer13-Aug-09 1:00 
Generalinvoking events of a control under another control Pin
jamesjk13-Aug-09 1:15
jamesjk13-Aug-09 1:15 
Questioninvoking events of a control under another control -- i shall make it clearer Pin
jamesjk13-Aug-09 1:16
jamesjk13-Aug-09 1:16 
QuestionAdding Dll reference problem........ Pin
shaina223112-Aug-09 20:06
shaina223112-Aug-09 20:06 
AnswerRe: Adding Dll reference problem........ Pin
Eslam Afifi12-Aug-09 21:01
Eslam Afifi12-Aug-09 21:01 
QuestionHow to identify the Process, that is created using Code ? Pin
Jacobb Michael12-Aug-09 19:03
Jacobb Michael12-Aug-09 19:03 
AnswerRe: How to identify the Process, that is created using Code ? Pin
V.12-Aug-09 20:27
professionalV.12-Aug-09 20:27 
GeneralRe: How to identify the Process, that is created using Code ? Pin
Jacobb Michael13-Aug-09 5:23
Jacobb Michael13-Aug-09 5:23 
QuestionC# Save the the last entered data on application exit and reload it on application start. Pin
maheesh12-Aug-09 16:49
maheesh12-Aug-09 16:49 
AnswerRe: C# Save the the last entered data on application exit and reload it on application start. Pin
N a v a n e e t h12-Aug-09 16:51
N a v a n e e t h12-Aug-09 16:51 
GeneralRe: C# Save the the last entered data on application exit and reload it on application start. Pin
maheesh12-Aug-09 18:50
maheesh12-Aug-09 18:50 
GeneralRe: C# Save the the last entered data on application exit and reload it on application start. Pin
Christian Graus12-Aug-09 19:00
protectorChristian Graus12-Aug-09 19:00 
GeneralRe: C# Save the the last entered data on application exit and reload it on application start. Pin
maheesh12-Aug-09 19:19
maheesh12-Aug-09 19:19 
AnswerRe: C# Save the the last entered data on application exit and reload it on application start. Pin
Mycroft Holmes12-Aug-09 18:08
professionalMycroft Holmes12-Aug-09 18:08 
AnswerRe: C# Save the the last entered data on application exit and reload it on application start. Pin
mustang8612-Aug-09 20:00
mustang8612-Aug-09 20:00 

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.