Results 1 to 2 of 2

Thread: [02/03] Drawing on a stretched image co-ordinate problem

  1. #1

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    [02/03] Drawing on a stretched image co-ordinate problem

    When the picturebox1 size mode is set to normal the co-ordinates I use seem to work fine. Under the mouse move event I defined the size of the shape using:

    rect = New Rectangle(ptStart.X, ptStart.Y, intWidth, intHeight)

    However, if i change the picturebox size mode to 'stretched' it wont draw as I need. Shapes end up in weird places. I can understand why this problem occurs, I just don't know how to work around it. Is there a simple answer? What should I be looking for?

    Thanks,
    Stim

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [02/03] Drawing on a stretched image co-ordinate problem

    Quote Originally Posted by stimbo
    When the picturebox1 size mode is set to normal the co-ordinates I use seem to work fine. Under the mouse move event I defined the size of the shape using:

    rect = New Rectangle(ptStart.X, ptStart.Y, intWidth, intHeight)

    However, if i change the picturebox size mode to 'stretched' it wont draw as I need. Shapes end up in weird places. I can understand why this problem occurs, I just don't know how to work around it. Is there a simple answer? What should I be looking for?

    Thanks,
    Stim
    Hi,

    You could try this;

    VB Code:
    1. rect = New Size(ptStart.X, ptStart.Y, intWidth, intHeight)
    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width