Click here to Skip to main content
16,011,626 members
Home / Discussions / C#
   

C#

 
AnswerRe: Combination console/form app Pin
MidwestLimey13-Jun-07 13:27
professionalMidwestLimey13-Jun-07 13:27 
AnswerRe: Combination console/form app Pin
eosisms14-Jun-07 8:56
eosisms14-Jun-07 8:56 
Questionhow can ... Pin
B.A13-Jun-07 6:51
B.A13-Jun-07 6:51 
AnswerRe: how can ... Pin
Ed.Poore13-Jun-07 7:54
Ed.Poore13-Jun-07 7:54 
Questioncontroling status of a call made by a hanset using tapi 3 Pin
georgishelpmegodtoo13-Jun-07 6:10
georgishelpmegodtoo13-Jun-07 6:10 
QuestionNeed a DataGridView With Footer. Pin
hdv21213-Jun-07 5:39
hdv21213-Jun-07 5:39 
AnswerRe: Need a DataGridView With Footer. Pin
Not Active13-Jun-07 6:08
mentorNot Active13-Jun-07 6:08 
QuestionMoving a control in runtime with c#, without using c++ api Pin
sinosoidal13-Jun-07 4:15
sinosoidal13-Jun-07 4:15 
Hi,

I'm trying to move a control while clicking on it. it works but very bad!

When i click the control down (panel), and start moving it, it is continuosly swaping between two position and i cant find a reason for that behaviour.

This is my code (only the event handlers):

<br />
        private void panel_MouseDown(object sender, MouseEventArgs e)<br />
        {<br />
            Console.WriteLine("mouse down");<br />
            Panel region = (Panel)sender;<br />
            <br />
            drag = true;<br />
        }<br />
<br />
        private void panel_MouseUp(object sender, MouseEventArgs e)<br />
        {<br />
            Console.WriteLine("mouse up");<br />
            drag = false;<br />
        }<br />
<br />
        private void panel_MouseMove(object sender, MouseEventArgs e)<br />
        {<br />
            if (drag)<br />
            {<br />
                this.SuspendLayout();<br />
                Panel region = (Panel)sender;<br />
<br />
                region.Location = new Point(e.X, e.Y);<br />
<br />
                Console.WriteLine("Panel position: (" + region.Left + "," + region.Top + ")" + "mouse position: (" + e.X + "," + e.Y + ")");<br />
                this.ResumeLayout();<br />
            }<br />
        }<br />


Someone has given me an answer to this problem using user32.dll but i want to have more control of the thing.

Can anyone help me?

Thx

Nuno
AnswerRe: Moving a control in runtime with c#, without using c++ api [modified] Pin
Martin#13-Jun-07 4:30
Martin#13-Jun-07 4:30 
GeneralRe: Moving a control in runtime with c#, without using c++ api Pin
sinosoidal13-Jun-07 4:51
sinosoidal13-Jun-07 4:51 
AnswerRe: Moving a control in runtime with c#, without using c++ api Pin
Guffa13-Jun-07 7:21
Guffa13-Jun-07 7:21 
QuestionMODI - Microsoft office document imaging 11.0? Pin
$uresh $hanmugam13-Jun-07 3:59
$uresh $hanmugam13-Jun-07 3:59 
Question.net 2.0 - loop through the second collection Pin
arkiboys13-Jun-07 3:28
arkiboys13-Jun-07 3:28 
AnswerRe: .net 2.0 - loop through the second collection Pin
Russell Jones13-Jun-07 3:33
Russell Jones13-Jun-07 3:33 
GeneralRe: .net 2.0 - loop through the second collection Pin
arkiboys13-Jun-07 3:36
arkiboys13-Jun-07 3:36 
Questionproblem in writing a file Pin
saqib8213-Jun-07 3:20
saqib8213-Jun-07 3:20 
AnswerRe: problem in writing a file Pin
Pete O'Hanlon13-Jun-07 4:00
mvePete O'Hanlon13-Jun-07 4:00 
AnswerRe: problem in writing a file Pin
lmoelleb13-Jun-07 4:15
lmoelleb13-Jun-07 4:15 
QuestionScrolling FlowLayoutPanel Pin
zaboboa13-Jun-07 3:08
zaboboa13-Jun-07 3:08 
Questionprint document with it's format Pin
merwa13-Jun-07 2:45
merwa13-Jun-07 2:45 
AnswerRe: print document with it's format Pin
Ed.Poore13-Jun-07 7:55
Ed.Poore13-Jun-07 7:55 
QuestionCrystal Reports Database login prompt [modified] Pin
Seishin#13-Jun-07 2:44
Seishin#13-Jun-07 2:44 
QuestionDisable Delete Key in Keyboard. Pin
Rahul8313-Jun-07 2:37
Rahul8313-Jun-07 2:37 
AnswerRe: Disable Delete Key in Keyboard. Pin
Pete O'Hanlon13-Jun-07 2:42
mvePete O'Hanlon13-Jun-07 2:42 
AnswerRe: Disable Delete Key in Keyboard. Pin
Hesham Yassin14-Jun-07 8:39
Hesham Yassin14-Jun-07 8:39 

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.