다른 해상도 사이에서 크기가 다른 PictureBox
과 관련된 문제가 있습니다.PictureBox에서 그림 영역 가져 오기
나는 그 이미지가 PictureBox
인데, 크기를 스스로 조정해야하기 때문에 드로잉 크기를 알아야합니다. (그렇지 않으면 시스템이 너무 느리고,하기로 결정했습니다. 수동으로 크기 조정, 해상도가 필요한지 잘 작동합니다).
나는 PictureBox.Height/Width
과 PictureBox.ClientRectangle.Height/Width
을 시도했지만 그 값은 모든 해상도에서 동일합니다. 실제 드로잉 크기를 얻으려면 어떻게해야합니까?
초기화 코드 :이 앵커가 설정되고 함께 할 수있다, 그러나 이것은 PictureBox를 잘 서로 다른 해상도로 볼되고 있습니다 이해
//
// PicboxRed
//
this.PicboxRed.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PicboxRed.BackColor = System.Drawing.Color.DimGray;
this.PicboxRed.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.PicboxRed.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.PicboxRed.Location = new System.Drawing.Point(19, 92);
this.PicboxRed.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.PicboxRed.Name = "PicboxRed";
this.PicboxRed.Size = new System.Drawing.Size(852, 840);
this.PicboxRed.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal;
this.PicboxRed.TabIndex = 9;
this.PicboxRed.TabStop = false;
this.PicboxRed.Click += new System.EventHandler(this.PicboxRed_Click);
this.PicboxRed.Paint += new System.Windows.Forms.PaintEventHandler(this.Picbox_Paint);
. 어떻게 그 그리기 영역을 잡을 수 있습니까?
감사합니다. 실제로 표시 될 때만 초기화되고 초기화 후에는 크기가 조정되지 않습니다. 그 다음에 기대 값이 나타났다. – SinisterMJ