Click here to Skip to main content
15,902,735 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# code location Pin
TheShaver6-Jun-07 14:28
TheShaver6-Jun-07 14:28 
GeneralRe: C# code location Pin
Judah Gabriel Himango7-Jun-07 4:23
sponsorJudah Gabriel Himango7-Jun-07 4:23 
QuestionDrag and Drop Pin
Sergio Paque6-Jun-07 6:28
Sergio Paque6-Jun-07 6:28 
AnswerRe: Drag and Drop Pin
I Believe In GOD6-Jun-07 6:38
I Believe In GOD6-Jun-07 6:38 
QuestionGetting Files that start with letters only Pin
hebes_996-Jun-07 5:57
hebes_996-Jun-07 5:57 
AnswerRe: Getting Files that start with letters only Pin
Luc Pattyn6-Jun-07 6:04
sitebuilderLuc Pattyn6-Jun-07 6:04 
GeneralRe: Getting Files that start with letters only Pin
hebes_996-Jun-07 6:09
hebes_996-Jun-07 6:09 
QuestionMoving a control with the mouse Pin
sinosoidal6-Jun-07 5:49
sinosoidal6-Jun-07 5:49 
Hi,

I'm implementing a drag object operation with panels.

The code i'm using for that is:

<br />
        private void panel_MouseDown(object sender, MouseEventArgs e)<br />
        {<br />
            Panel region = (Panel)sender;<br />
<br />
            drag = true;<br />
            panelBeingMoved = region;<br />
<br />
            x = e.X;<br />
            y = e.Y;<br />
        }<br />
<br />
        private void panel_MouseUp(object sender, MouseEventArgs e)<br />
        {<br />
            drag = false;<br />
            panelBeingMoved = null;<br />
        }<br />
<br />
        private void panel_MouseMove(object sender, MouseEventArgs e)<br />
        {<br />
            if (drag) {<br />
                panelBeingMoved.Left += e.X + x;<br />
                panelBeingMoved.Top += e.Y -y;<br />
                              <br />
                x = e.X;<br />
                y = e.Y;<br />
            }<br />
        }<br />


The problem is that the panel behaves in a very strange way. Instead of coming togheter smoothly with the mouse it is always jumping around with some pattern that i can justify.

Is there any simple explanation for this bahaviour?

What am i missing?

Thx,

Nuno
AnswerRe: Moving a control with the mouse Pin
I Believe In GOD6-Jun-07 6:22
I Believe In GOD6-Jun-07 6:22 
GeneralRe: Moving a control with the mouse Pin
sinosoidal7-Jun-07 21:59
sinosoidal7-Jun-07 21:59 
GeneralRe: Moving a control with the mouse Pin
I Believe In GOD8-Jun-07 7:03
I Believe In GOD8-Jun-07 7:03 
Questiontreeview and tooltip Pin
Saamir6-Jun-07 4:18
Saamir6-Jun-07 4:18 
AnswerRe: treeview and tooltip Pin
I Believe In GOD6-Jun-07 4:30
I Believe In GOD6-Jun-07 4:30 
QuestionRe: treeview and tooltip Pin
Saamir6-Jun-07 4:34
Saamir6-Jun-07 4:34 
AnswerRe: treeview and tooltip Pin
Giorgi Dalakishvili6-Jun-07 4:31
mentorGiorgi Dalakishvili6-Jun-07 4:31 
QuestionRe: treeview and tooltip Pin
Saamir6-Jun-07 4:44
Saamir6-Jun-07 4:44 
GeneralRe: treeview and tooltip Pin
Saamir6-Jun-07 4:54
Saamir6-Jun-07 4:54 
GeneralRe: treeview and tooltip Pin
Giorgi Dalakishvili6-Jun-07 5:09
mentorGiorgi Dalakishvili6-Jun-07 5:09 
QuestionConnection with Oracle9i Pin
sarwarmdgolam6-Jun-07 4:16
sarwarmdgolam6-Jun-07 4:16 
AnswerRe: Connection with Oracle9i Pin
Tarakeshwar Reddy6-Jun-07 5:17
professionalTarakeshwar Reddy6-Jun-07 5:17 
QuestionUsing enumerated types Pin
Dewald6-Jun-07 3:56
Dewald6-Jun-07 3:56 
AnswerRe: Using enumerated types Pin
DavidNohejl6-Jun-07 4:05
DavidNohejl6-Jun-07 4:05 
GeneralRe: Using enumerated types Pin
Dewald6-Jun-07 4:57
Dewald6-Jun-07 4:57 
AnswerRe: Using enumerated types Pin
Guffa6-Jun-07 4:10
Guffa6-Jun-07 4:10 
GeneralRe: Using enumerated types Pin
Dewald6-Jun-07 4:49
Dewald6-Jun-07 4:49 

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.