Results 1 to 4 of 4

Thread: VB6 - PictureView usercontrol

  1. #1

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    VB6 - PictureView usercontrol

    Sometimes you might to have a scrollable area where to show pictures. Well, here is a simple solution to that: add usercontrol to your project and you don't need to do any extra coding.

    Features:
    - center picture when no scrolling required
    - move picture with the second mouse button
    - can save in .JPG (thanks to JPEG Encoder Class by John Korejwa)
    - customizable borderstyle
    - customizable corner borderstyle (visible only when both scrollbars are visible)
    - functions: ClearPicture, OpenPicture

    Events:
    - Click
    - DblClick
    - KeyDown
    - KeyPress
    - KeyUp
    - MouseDown
    - MouseMove
    - MouseUp
    - PictureLoaded


    And here is the code with a simple sample project:
    Attached Files Attached Files

  2. #2

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Version 1.01

    Updated version. New features:
    - NewPicture function, allows you to create new picture
    - PictureDC function, returns the picture's hDC so you can use BitBlt or anything else directly from your app without editing the control
    - PicturePaint sub, forces repaint of the control. Use this after painting.
    Attached Files Attached Files

  3. #3

    Thread Starter
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Version 1.02

    Yet another version, this time improved a lot: thanks to the new features, it is now possible to create a full Paint program!

    You can this time find the code at PlanetSourceCode - you know I like votes, no matter to how old control they come

  4. #4
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,487

    Re: Version 1.02

    Quote Originally Posted by Merri View Post
    Yet another version, this time improved a lot: thanks to the new features, it is now possible to create a full Paint program!

    You can this time find the code at PlanetSourceCode - you know I like votes, no matter to how old control they come
    With the death of PSC, it would be great if you could either -
    Attach the project
    OR
    Someone could guide us on how to find it in the recent vbforums members' efforts to 'clone' PSC

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