T
ThunderMusic
Hi,
I have a borderless form and I try to drag it. When I do it, the form start
to jump from position to position even when I don't move the mouse... My
formula seems right, but the result is not... can somebody help me please?
here is the code:
private void managementConsoleBarSmall1_MouseDown(object sender,
MouseEventArgs e)
{
if (!m_Dragging)
{
m_InitialDragPoint = new Point(e.X, e.Y);
}
m_Dragging = true;
}
private void managementConsoleBarSmall1_MouseUp(object sender,
MouseEventArgs e)
{
m_Dragging = false;
}
private void managementConsoleBarSmall1_MouseMove(object sender,
MouseEventArgs e)
{
if (m_Dragging)
{
this.SetBounds(this.Left + (e.X - m_InitialDragPoint.X), this.Top +
(e.Y - m_InitialDragPoint.Y), this.Width, this.Height);
this.m_InitialDragPoint = new Point(e.X, e.Y);
System.Threading.Thread.Sleep(10);
}
}
Someone sees something wrong here?
thanks
ThunderMusic
I have a borderless form and I try to drag it. When I do it, the form start
to jump from position to position even when I don't move the mouse... My
formula seems right, but the result is not... can somebody help me please?
here is the code:
private void managementConsoleBarSmall1_MouseDown(object sender,
MouseEventArgs e)
{
if (!m_Dragging)
{
m_InitialDragPoint = new Point(e.X, e.Y);
}
m_Dragging = true;
}
private void managementConsoleBarSmall1_MouseUp(object sender,
MouseEventArgs e)
{
m_Dragging = false;
}
private void managementConsoleBarSmall1_MouseMove(object sender,
MouseEventArgs e)
{
if (m_Dragging)
{
this.SetBounds(this.Left + (e.X - m_InitialDragPoint.X), this.Top +
(e.Y - m_InitialDragPoint.Y), this.Width, this.Height);
this.m_InitialDragPoint = new Point(e.X, e.Y);
System.Threading.Thread.Sleep(10);
}
}
Someone sees something wrong here?
thanks
ThunderMusic