PictureBox
 
Files Included Reference
Installation Hints and Tips
Using the Control Examples

|

|

Download

The S309PictureBox.ocx Version 2.7 provides a PictureBox ActiveX control that can:

  • Display Bitmap (bmp and 2bp), Gif, Jpeg, and XBM image files.
  • Display bitmap resources from resource files, including common bitmaps such as FileOpen and FileClose.
  • Capture and display an image of the physical screen.
  • Save an image as a bitmap file.
  • Display and animate playing cards like the ones used in the Solitaire game provided with Windows CE.
  • Clip, Invert colors, Mirror, Resize, Rotate, and Scroll an image.
  • Display any image with a transparent color.
  • Provide access to individual pixels in the image.
  • Specify colors using RGB or QBColor notation.
  • Overlay one image on top of another.
  • Draw lines, rectangles, circles, polygons, and round rectangles.
  • Change the color depth of an image.
  • Refresh the Desktop Wallpaper.
  • Support better drawing, See DrawMouseMoveLineEx.
  • Support 64K color displays.
  • Support Drawing Text.
  • Support Command Button emulation.
  • Support Label emulation.
  • Use Scroll Bars.
  • Display icon resources from executable files, resource files, and icon (*.ico) files.
  • Support the S309PictureBox on the NS Basic Toolbar.
  • Tap and hold support for the Pocket PC.

The S309PictureBox maintains the picture being displayed as an image, which is not necessarily the same width and/or height as the S309PictureBox. You can have the S309PictureBox automatically size itself to the width and height of the image or have the image stretched or shrunk to the size of the S309PictureBox when displayed. All drawing and pixel manipulation is done on the image.

This control will not expire.

 

Files Included

  • S309PictureBox.ocx - the ActiveX control

    Files Included in the Documentation Zip file:

  • S309PictureBox.html - the documentation (this file).
  • S309PictureBox_tips.html - hint and tips

    Files Included in the NS Basic Samples Zip file:

  • S309PictureBox.nsb - sample program using S309PictureBox ActiveX control.
  • S309PictureBox Bitmap Resource.nsb - sample program using S309PictureBox ActiveX control to display bitmaps from resource files (some in ROM).
  • S309PictureBox Common Bitmap.nsb - sample program using S309PictureBox ActiveX control to display common bitmaps ( All in ROM).
  • S309PictureBox PlayingCard.nsb - sample program using S309PictureBox ActiveX control to display Playing Cards.
  • S309PictureBox Capture Control.nsb - sample program using S309PictureBox ActiveX control to capture the contents of another control.
  • S309PictureBox Drawing.nsb - sample program using some of the drawing methods.
  • S309 Pyramid Solitaire.nsb - a pyramid solitaire game.

 


 

Installation of PictureBox ActiveX control on Windows CE

Transfer the ocx file for your processor to the \Windows directory

Register the control on Windows CE by doing:

Start - Run - regsvrce \Windows\S309PictureBox.ocx

You should get "DllRegisterServer in \Windows\S309PictureBox.ocx Succeeded."

Installation of PictureBox ActiveX control on the Desktop

Transfer the desktop version of the S309Picturebox.ocx to the c:\Windows\system32 directory

Register the control on the desktop by doing:

Start - Run - regsvr32 c:\Windows\system32\S309PictureBox.ocx

You should get "DllRegisterServer in c:\Windows\system32\S309PictureBox.ocx Succeeded."

When the desktop control is registered properly it will automatically add the registry entries to enable it to be used with VBCE.

 


 

Using the PictureBox ActiveX control in NS Basic

AddObject "S309.PictureBox.1", "picControl", xpos, ypos, width, height
picControl.Picture = "\Windows\Honey.2bp"

"picControl" can be any name
xpos is the x-coord
ypos is the y-coord
width is the width of the control
height is the height of the control

Using the PictureBox ActiveX control in NS Basic to do a screen capture and save it to a file.

AddObject "S309.PictureBox.1", "picControl", 0,0,0,0
picControl.CaptureScreen
picControl.SaveImageToFile "\Screen Capture.bmp",0