Performance is bad

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I create a circle image form, drag and drop this image on the screen, if I drag
this circle fast to the right, the left part of the image is cut, looks to me the performance is not good as I expected, another issue is if I only create a windows form, then goto task manager, the memory usage is more than 15mb, is there any way can reduce the memory usage?
 
Hi Steve,

I create a circle image form, drag and drop this image on the screen, if I drag this circle fast to the right, the left part of the image is cut, looks to me the
--> Do you mean in visual studio .net or during runtime of you application?

Cheers.
 
Chua Wen,

Thanks for the quick response, this is run time application, you can create a form image(any shape) easily from C#, and run the image, part of the code as below(get from MSDN):
private void Form1_MouseDown(object sender, ystem.Windows.Forms.MouseEventArgs e)
{
int xOffset;
int yOffset;

if (e.Button == MouseButtons.Left)
{
xOffset = -e.X;
yOffset = -e.Y;
mouseOffset = new Point(xOffset, yOffset);
isMouseDown = true;
}

}

private void Form1_MouseMove(object sender, ystem.Windows.Forms.MouseEventArgs e)
{
if (isMouseDown)
{ Point mousePos = Control.MousePosition;
mousePos.Offset(mouseOffset.X, mouseOffset.Y);
Location = mousePos;
}
}

private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isMouseDown = false;
}
}
By the way, did you aware that the memory usgae issue, as long as you create a Windows form from C#, the minimun memory usage is at least 14-15MB.

B. RGDS
Steve
 
Chua Wen,

Sorry I just back from vacation and can I contact with you?
My email address is (e-mail address removed)

B. RGDS
Steve
 
Back
Top