String ludisk=the string. Format (" D: \ \ 11 \ \ 0101 JPG ");
The Stream s=File. Open (ludisk, FileMode. Open, FileAccess. Read, FileShare. ReadWrite);
//imgL=Image. FromStream (s);
ImgL=Bitmap. FromStream (s);
Spyware doctor ispose ();
Bit=(Bitmap) imgL;
Label1. Text=bit. Width. The ToString () + "____" + bit. Height. The ToString ();
GraphicsUnit units=GraphicsUnit. Pixel;//units set into pixels
Bitmap bmpVoltage1=new Bitmap (Width - 50, Height);
Graphics gVoltage1=Graphics. FromImage (bmpVoltage1);
For (int I=0; I & lt; 5000; I=I + 1)
{
Srect=new Rectangle (I, 00, 2000, 1080);
//gVoltage1. DrawImage (bit, the rect, I, 0200, 0108, units);
GVoltage1. DrawImage (bit, 0, 0, srect, units);
//gVoltage1. DrawImage (bit drect, srect, units);
PictureBox. Image=bmpVoltage1;
PictureBox. The Update ();
PictureBox. Invalidate ();
}
CodePudding user response:
In speed adjustment for it every time I increase the size of the jitter is likely to be the faster, the greater theCodePudding user response:
PictureBox. The Update ();//update the display immediately, will refresh the picturebox. Image, do a whole drawingPictureBox. Invalidate ();//send a message that pictureBox visible parts all invalid, trigger drawing
The two, you delete the second try,
In addition, under the double buffer drawing understanding,
CodePudding user response:
Open the double buffered DoubleBuffered=true;All controls have this property
CodePudding user response:
Is open the double buffered pictureBox controlCodePudding user response: