private void panel1_SizeChanged(object sender, EventArgs e) { if (qrRecognitionControl1 != null) // 可能控件还没有创建 2014/10/14 { qrRecognitionControl1.PerformAutoScale(); } }
private void panel1_SizeChanged(object sender, EventArgs e) { // this.qrRecognitionControl1.Size = this.panel1.Size; /* * this.qrRecognitionControl1.Dock = DockStyle.None; * this.qrRecognitionControl1.Dock = DockStyle.Fill; * */ if (qrRecognitionControl1 != null) // 可能控件还没有创建 2014/10/14 { qrRecognitionControl1.PerformAutoScale(); } }