Results 1 to 5 of 5

Thread: Scale in VB.NET

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    5

    Scale in VB.NET

    I have a VB 6 app. that reads in x, y coordinates and then draws a polygon from these coordinates on the screen. I used the "Scale" method of the form (e.g., Form1.Scale) to set the upper left and lower right coordinates of the form to the min/max x and y values so I could plot out all coordinates on the screen.

    I've having problems doing this in .NET since the Scale method is not supported. Is there something similar to Scale that will let me set the upper left and lower right coordinates of a form in custom units rather than pixels? Any thoughts appreciated.

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: Scale in VB.NET

    Originally posted by JCK
    I have a VB 6 app. that reads in x, y coordinates and then draws a polygon from these coordinates on the screen. I used the "Scale" method of the form (e.g., Form1.Scale) to set the upper left and lower right coordinates of the form to the min/max x and y values so I could plot out all coordinates on the screen.

    I've having problems doing this in .NET since the Scale method is not supported. Is there something similar to Scale that will let me set the upper left and lower right coordinates of a form in custom units rather than pixels? Any thoughts appreciated.
    well I'm guessing you're using a Graphics object to draw your thingies (how else ha?) I think the best way would be to try this method, worked well for me, but not for the same purpose. Just call it once, and then whenever you draw something with your graphics object it should be "translated" to the amount you specified

    Graphics.TranslateTransform
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    5
    Thanks, I'll give it a try.

  4. #4
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by JCK
    Thanks, I'll give it a try.
    umm did I tell you the right thing? if you want to shift stuff thats the right thing but if you want to change the scale then I think there is also a scaleTransform function. Let me know if it works out for you
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    5
    Thanks, I'll try that also. I'll let you know if I have any luck.

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