How to put value in a System.Drawing.Point object?

B

Bilo

Need Help with

System.Drawing.Point b = new System.Drawing.Point(int x , int y)

I want to move a window when mous is down and mous is moving

private void label1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left && video.Fullscreen != true)
{
System.Drawing.Point b = new
System.Drawing.Point(outputposx-mouseposx+MediaOutForm.MousePosition.X,
outputposy-mouseposy+MediaOutForm.MousePosition.Y);
output.Location = b;
}
}

It works but isnt it so that it generates objects of type Point every time
when mouse is moved?
I want to declare
System.Drawing.Point b = new System.Drawing.Point();
in the Class and want only put the values in the Mouse_Move event.
But how can I put values into b (Point object??)

Thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top