RectangleF.FromLTRB(Math.Min(startPoint.X, endPoint.X), Math.Min(startPoint.Y, endPoint.Y), Using (SolidBrush blueBrush = new SolidBrush(Color.FromArgb(128, Color.Aqua)))
PointF endPoint = pdfViewer1.GetClientPoint(endPosition) PointF startPoint = pdfViewer1.GetClientPoint(startPosition) If (startPosition != null & endPosition != null) Void pdfViewer1_Paint(object sender, PaintEventArgs e) Void pdfViewer1_MouseUp(object sender, MouseEventArgs e) Void pdfViewer1_MouseMove(object sender, MouseEventArgs e)ĮndPosition = pdfViewer1.GetDocumentPosition(e.Location) StartPosition = pdfViewer1.GetDocumentPosition(e.Location) Void pdfViewer1_MouseDown(object sender, MouseEventArgs e) PdfViewer1.MouseUp += pdfViewer1_MouseUp PdfViewer1.MouseMove += pdfViewer1_MouseMove PdfViewer1.MouseDown += pdfViewer1_MouseDown