Image: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[file:Image.jpg]] | [[file:Image.jpg]] | ||
== Description == | |||
The Image control is used to display an image. The image can be any common format, including jpg, bmp, gif or png. The image is scaled to fit the bounds. | The Image control is used to display an image. The image can be any common format, including jpg, bmp, gif or png. The image is scaled to fit the bounds. | ||
Line 11: | Line 11: | ||
For more control of images at runtime, use the PictureBox control. | For more control of images at runtime, use the PictureBox control. | ||
== Properties == | |||
Standard [[properties and methods|properties]] are supported, plus: | Standard [[properties and methods|properties]] are supported, plus: | ||
Line 19: | Line 19: | ||
|} | |} | ||
== Events == | |||
Standard [[events|events]] are supported. | Standard [[events|events]] are supported. | ||
== Example == | |||
<pre> | <pre> | ||
Line 32: | Line 32: | ||
</pre> | </pre> | ||
== Output == | |||
[[file:ImageOutput.jpg]] | [[file:ImageOutput.jpg]] | ||
== Related Items == | |||
[[picturebox|PICTUREBOX]] | [[picturebox|PICTUREBOX]] | ||
[[Category:Language Reference]] |
Revision as of 16:40, 17 August 2012
Description
The Image control is used to display an image. The image can be any common format, including jpg, bmp, gif or png. The image is scaled to fit the bounds.
To add an image to your app, choose the Image icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the button: usually, just onclick.
Images should be in your project folder or a subfolder. Add the name of the file or folder to the manifest in Project Properties.
For more control of images at runtime, use the PictureBox control.
Properties
Standard properties are supported, plus:
src | The name of the file. For example, mario.jpg. The file should be in the current folder. At runtime, use Image1.firstChild.src=”a.jpg” |
Events
Standard events are supported.
Example
REM Image Example Function Image1_onmouseover() Msgbox "Over!" End Function