G
Guest
Dear all,
I'm new here and I'm sorry to trouble.
But I've got the following problem when trying to draw a PNG file on a panel.
My code is like this:
Image mapImage = Image.FromFile (imageFileNames);
Graphics graphics = this.splitContainer1.Panel1.CreateGraphics();
graphics.Clear(this.splitContainer1.Panel1.BackColor);
graphics.DrawImage(mapImage, 10, 10, 50, 50);
this.splitContainer1.Panel1.Invalidate();
I can see that my imageFileNames is correct.
But the image fails to appear on the screen.
Would anyone please help me out?
Thanks in advance.
I'm new here and I'm sorry to trouble.
But I've got the following problem when trying to draw a PNG file on a panel.
My code is like this:
Image mapImage = Image.FromFile (imageFileNames);
Graphics graphics = this.splitContainer1.Panel1.CreateGraphics();
graphics.Clear(this.splitContainer1.Panel1.BackColor);
graphics.DrawImage(mapImage, 10, 10, 50, 50);
this.splitContainer1.Panel1.Invalidate();
I can see that my imageFileNames is correct.
But the image fails to appear on the screen.
Would anyone please help me out?
Thanks in advance.