表格大小拉伸至屏幕分辨率。表单中包含以下元素:在图片框中缓慢绘制图片
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.PictureBox pictureBox7;
private System.Windows.Forms.PictureBox pictureBox8;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox9;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel panel1;
当您打开窗体时,它会立即将图像从文件夹加载到面板。例如:
pictureBox2.Load("bgr/1.png");
图像加载和显示,但他们得出了很长时间,也就是说,你可以看到图像本身零件的绘制。
问:我怎样才能解决慢绘制图像的问题或使其对用户不可见?
都比他们要显示的PictureBoxes更大的图像?图像越大,渲染时间就越长...... – adv12
@ adv12不,pictureBoxes比图像稍大 –
查看一些关于PictureBoxes的建议[here](https://stackoverflow.com/questions/2151456/winforms -performance-mystery-derived-picturebox-control-slow-the-origina)和[here](https://stackoverflow.com/questions/28689358/slow-picture-box)和[here](https:/ /stackoverflow.com/questions/3567558/display-picture-box-faster) –