Results 1 to 4 of 4

Thread: How can I get the visible bounds of a picturebox?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    How can I get the visible bounds of a picturebox?

    Well, I have a class which magnifies the picture inside a picturebox. The problem is that it takes SOO much memory. So instead of magnifying the whole picture, I want to just magnify the visible part of it. For example let's say I have a picturebox on a form, and that the picturebox is larger than my form, so some of it is not visible on the screen, and some of it is visible..... how can I get the bounds of the visible part? I'm gussing there should be a way
    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!!

  2. #2

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    bump

    there is a GetVisibleBounds property (picbox.IMage), but it doesnt work
    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
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    This is assuming that the picture box is in the bottom right corner. You might need to change it.
    Viewable:
    width = form1.width - picbox.left
    height = form1.height - picbox.top

    That seems too easy. Something tells me that wasn't what your looking for.

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by hellswraith
    That seems too easy. Something tells me that wasn't what your looking for.
    yeah it wasn't, hehe

    I do not have access to the form. I only have access to the picturebox
    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!!

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