PNG images only work in KiXforms.NET.

The example below places a red triangle at the top right of the label. It assumes that the file redtriangle.png is in the same folder as the script is.

 Code:
Break On
$System = CreateObject("Kixforms.System")
If Not $System
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf
$nul = $System.Application.EnableVisualStyles

$Form1 = $System.Form()
$Form1.Left = 0
$Form1.StartPosition = 0  ;FormStartPosition_Manual
$Form1.Size = $System.Size(271,215) ;(Width,Height)
$Form1.Text = "Form1"
$Form1.Top = 0

$Label1 = $System.Label()
$Label1.BorderStyle = 1  ;FixedSingle
$Label1.Height = 40
$Label1.ImageAlign = 1  ;Top,Left
$Label1.Left = 60
$Label1.Text = "Label with some text in it and an image at the top left corner."
$Label1.Top = 40
$Label1.Width = 130
$nul = $Form1.Controls.Add($Label1)

$Label1.Image = $System.Bitmap(@SCRIPTDIR + "\redtriangle.png")

$Form1.Show  ;Displays the Form

While $Form1.Visible
   $Nul = Execute($Form1.DoEvents())
Loop
Exit 0


Attachments
226.png
Description:




Edited by Mart (2011-05-04 10:09 PM)
Edit Reason: Too much code with the base64 image. Switched to file image.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.