Home > Language Reference > Classes > HtmlViewer
Image Event
Raised to obtain an image.
Syntax
Public Event Image(ByVal sBase As String, ByVal sURI As String, ByRef objBmp As Bitmap)
| Parameter | Description |
| sBase | Base address. |
| sURI | Relative URI of the bitmap. |
| objBmp | Bitmap to be returned to the control. |
Remarks
The Image event is raised when the parser encounters an <img> tag in the XHTML document. The sBase parameter contains the value of the last encountered <base> tag or an empty string if no <base> tag is present, while the sURI parameter contains the value of the src attribute of the image. The system does not interpret these strings, they are passed to your application exactly as they appear in the document.
A handler for this event should use the sBase and sURI parameters to locate the image, load it into a Bitmap object and return it through the objBitmap parameter. The following example simply creates a new bitmap and draws some text on it:
Private Sub HtmlViewer1_Image(ByVal sBase As String, ByVal sURI As String, ByRef objBmp As Bitmap) objBmp=new Bitmap objBmp.Create 40, 20 objBmp.TextOut 0, 0, sURI, hbTextAlignLeft+hbTextAlignTop End Sub
The MiniBrowser and HtmlText samples show more realistic implementations.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | - |
| Windows CE | Windows CE 3.0 | - |