Home > Net >  A thread in the system. Drawing being used
A thread in the system. Drawing being used

Time:10-10

Made a sequence of frames in a thread but in the open dialog box or other form, can be an error object occupied
Don't know how to solve, is the main program to plot window image is drawn and the thread conflict?
 
Private Bitmap Bitmap=new Bitmap (2000, 2000);
Private outimg=Graphics. FromImage (bitmap);
Private void PlayGif ()//flash thread
{
Outimg. DrawImage (ImgCom (x1), bitmap. The Width/2 - CenPt [r]. X1 X,
Bitmap. Height/2 - CenPt [x1] Y, ImgCom [x1]. Width, ImgCom [x1]. Height);
PictureBox1. Image=bitmap;
Thread.sleep (1000/FormRate);
}


CodePudding user response:

A temporary solution, as I am in all need to draw the Windows window before termination sequence frame thread, window restart upon completion of loading, and the great god is there a better way
  •  Tags:  
  • C#
  • Related