Stretch Property for PictureBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vdraceil
    New Member
    • Jul 2007
    • 236

    Stretch Property for PictureBox

    I'm currently working on a project in vb6. I have to display icons in the form.
    I use DrawIcon(pictur ebox1.hDC,0,0,h Icon) API to draw the icon into the picture box. As image box does'nt have hDC property i cannot draw icon into it.
    Now i want to reduce the size of the picture box proportionately ,but as the picture box does'nt have stretch property the icon seems to be cropped.
    What do i do now?Any ideas?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    why you need DrawIcon just to display an icon.

    Comment

    • vdraceil
      New Member
      • Jul 2007
      • 236

      #3
      Actually i'm extracting a file's icon using SHGetFileInfo() API..that returns a structure containing a handle to the icon(hIcon)..so to use it i'm forced to go for DrawIcon().
      I've set
      picturebox1.hei ght=32*screen.t wipsperpixelY
      picturebox1.wid th=32*screen.tw ipsperpixelX
      Any decrease in the size makes it cropped.
      I dont know what to do..

      Comment

      • EYE4U
        Banned
        New Member
        • Oct 2008
        • 76

        #4
        I have an idea for you what about high quality icons.
        I am talking about PNG format png icons are large and have transparency...
        Using PNGs your app will look more cool.

        Use AlphaImage Control which i m attaching with the post.

        Regrads
        ARUZ
        Attached Files

        Comment

        Working...