ShowImage
Previous Topic  Next Topic 

Product

ShowImage

Manufacturer

Standard Satellite Forms component

Website

http://www.satelliteforms.net/

Source code provided

No

Platform

PocketPC

Sample project(s)

ShowImageFile

Keywords

image, bitmap, BMP, JPG, GIF, PNG, graphic, logo


The ShowImage control provides Satellite Forms Pocket PC applications the ability to display common image files including JPG/GIF/PNG/BMP and more on the current form.  Images are stretched/shrunk to fit the specified control rectangle.  The ShowImage control can also act like a button control by handling pen taps if desired.


Control configuration settings include:


VISIBLE=[true|false]

Show or hide the control when the form opens. The default if the VISIBLE property is not set is True.


BORDER=[true|false]

Show or hide a border around the control when the form opens. The default if the BORDER property is not set is False.


DOBUTTONBEHAVIOR=[true|false]

Specify whether the control acts like a button when the form opens by responding to pen taps and providing an OnClick event. The default if the DOBUTTONBEHAVIOR property is not set is False.


IMAGEFILE=\path        o\imagefile

Specify the image file to display when the form opens.


Script methods include:


SetVisible - Set VISIBLE property of ShowImage control (show or hide the control).

USAGE ShowImage1.SetVisible(true/false)


SetButtonBehavior - Set DOBUTTONBEHAVIOR property of ShowImage control.

USAGE ShowImage1.SetButtonBehavior(true/false)


SetBorder - Set BORDER property of ShowImage control.

USAGE ShowImage1.SetBorder(true/false)


SetImageFile - Set IMAGEFILE property of ShowImage control (which image to display).

USAGE ShowImage1.SetImageFile(imagefilepathname)


SetCtrlPosition - Set position (cx, cy) and size (cw, ch) of ShowImage control.

USAGE ShowImage1.SetCtrlPosition(cx, cy, cw, ch)


GetVisible - Get VISIBLE property of ShowImage control.

USAGE visible=ShowImage1.GetVisible()


GetButtonBehavior - Get DOBUTTONBEHAVIOR property of ShowImage control.

USAGE dobutton=ShowImage1.GetButtonBehavior()


GetBorder  - Get BORDER property of ShowImage control.

USAGE border=ShowImage1.GetBorder()


GetImageFile - Get IMAGEFILE property of ShowImage control.

USAGE imagefile=ShowImage1.GetImageFile()


GetCtrlPosition - Get position and size of ShowImage control.

USAGE ctrlpos=ShowImage1.GetCtrlPosition()

The cx, cy, cw, and ch values are returned as a space delimited string like this: "xxx yyy www hhh". You can extract the elements using the Mid operator like this:

cx = int(mid(ctrlpos, 0, 3))

cy = int(mid(ctrlpos, 4, 3))

cw = int(mid(ctrlpos, 8, 3))

ch = int(mid(ctrlpos, 12, 3))


ShowImageFile - Show an image file at the specified position by painting it directly onto the form (not as a custom control).

USAGE ShowImageFile(ImageFilePath, x, y, w, h)

This non-control method does not need to be prefixed with a control name because it can be used without having the SFX custom control on the form.



DocID: 10199  DocDate: 2008-05-28