therealmongoose
asked on
VB 2005 - image/graphics on user control
I have a user control on which a bitmap image is painted using a graphics object (i.e. not a background image). I need to be able to capture a section of the bitmap in the mouse move event so as mouse moves, rectangle section (rct.x = e.x, rct.y = e.y, rct.width = 100, rct.height = 100) of the existing graphic is captured to an image object variable, and then transferred as the texture of a new brush object which is used to paint a copy of the defined section on a different area of the user control.
Any code examples of how to do this much appreciated...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cool - thanks Bruce - just enough to let me solve it...
Dim pt As Point = Me.PointToScreen(New Point(e.X, e.Y))
(Point pt = this.PointToScreen(new Point(e.X, e.Y));)
Was the bit I was missing - thanks for your time...
Dim pt As Point = Me.PointToScreen(New Point(e.X, e.Y))
(Point pt = this.PointToScreen(new Point(e.X, e.Y));)
Was the bit I was missing - thanks for your time...
ASKER
Open in new window