Wilson Kutegeka

Microsoft MVP - Visual Basic www.clinicmaster.net

Custom Controls - Smart Picture Box

Introduction


SmartPictureBox Control: A picture box control is one of the most popular controls to display and received an image from a user. However, most of the time you’ll find yourself writing repetitive tasks such as

  • Load an image from file
  • Save an image from the control onto a file
  • Handle edit operations such as Copy, Cut, Paste, Delete, Undo, etc.

The SmartPictureBox control puts this together trough a context menu as shown below

SmartPictureBox Control with its context menu

 SmartPictureBox Control with its context menu

Members of interest of SmartPictureBox include the following:-

Properties

  • ReadOnly

If set to true, the pop up menu of the control will be hidden.

  • ImageSizeLimit

This property sets or gets the Maximum image file size limit.

 

Other Feature(s) Include

  • Enabling and disabling the menu appropriately depending upon what’s on the clipboard etc.

You can download the source code attached below

Comments

wakhuta said:

nice blog..

waiting for more posts

# August 27, 2009 10:31 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 6 and 2 and type the answer here: