![]() Show( " ImageViewer error: " + ex.ToString()) įunction: ZoomToSelection() is a new feature in ((boundingRect.Height - panelHeight) * 2) ((boundingRect.Height - panelHeight) * 2) <= 0)īoundingRect.Y = (boundingRect.Height - panelHeight). ((boundingRect.Height - panelHeight) * 2))) Is no issue but it comes up as soon as you start looking at theĮlse if ((boundingRect.Y <= (boundingRect.Height - panelHeight). You don't want the X or Y coordinates to become higher than zero. The main issue I had here is that as soon as you drag around your Image that Is never leaving the top left corner (X: 0, Y: 0). ![]() Fancy Cursor if (pbFull.Cursor != dragCursor)įunction: AvoidOutOfScreen() is used to avoid your Fancy Cursor if (pbFull.Cursor != Cursors.Cross) ![]() I'm not dragging OR selecting // Make sure if left or right shift is pressed to change cursor if ( this.IsKeyPressed( 0xA0) || this.IsKeyPressed( 0xA1) || selectMode = true) Am I still selecting within my panel? if (pbFullRect.Contains( new Point(e.X, e.Y))) Rectangle pbFullRect = new Rectangle( 0, 0, pbFull.Width - 1, pbFull.Height - 1) Am I dragging or selecting? if (shiftSelecting = true) Private void pbFull_MouseMove( object sender, MouseEventArgs e) Refresh my screen & update my preview panel Point ptPbFull = PointToScreen(pbFull.Location) Rectangle rect = CalculateReversibleRectangle(ptSelectionStart, ptSelectionEnd) Am i dragging or selecting? if (shiftSelecting = true) Private void pbFull_MouseUp( object sender, MouseEventArgs e) Left Shift or Right Shift pressed? Or is select mode one? if ( this.IsKeyPressed( 0xA0) || this.IsKeyPressed( 0xA1) || selectMode = true) Private void pbFull_MouseDown( object sender, MouseEventArgs e) If this is however not what you want, you can Set the Image programmatically andĭisable the Open button by setting the OpenButton property to The ImageViewer has a built-in Open Image button which can be used.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |