PictureBox Control

               

A PictureBox control can display a graphic from a bitmap, icon, or metafile, as well as enhanced metafile, JPEG, or GIF files. It clips the graphic if the control isn't large enough to display the entire image.

Syntax

PictureBox

Remarks

You can also use a PictureBox control to group OptionButton controls and to display output from graphics methods and text written with the Print method.

To make a PictureBox control automatically resize to display an entire graphic, set its AutoSize property to True.

To create animation or simulation, you can manipulate graphics properties and methods in code. Graphics properties and events are useful for run-time print operations, such as modifying the format of a screen form for printing.

A PictureBox control can also act as a destination link in a DDE conversation.

The PictureBox and Data controls are the only standard Visual Basic controls that you can place in the internal area of an MDI form. You can use it to group controls at the top or bottom of the internal area to create a toolbar or status bar.

Note   The Unisys Corporation has a patent that it alleges covers certain aspects of GIF-LZW compression technology, which the PictureBox and Image controls use. Microsoft Corporation obtained a license to the Unisys LZW patents in September, 1996. Microsoft's license does not, however, extend to software developers or third parties who use any Microsoft toolkit, language development, or operating system products to provide GIF read/write and/or any other LZW capabilities in their own products (for example, by way of DLLs and APIs).

If your commercial application uses this control (and thus, the LZW technology), you may wish to obtain an independent legal opinion on the effect of the patent, or contact Unisys USA at http://www.unisys.com/ for more information.