Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

MBS Xojo Plugin Tutorial Videos

ImageCapture Source

Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete

// Event implementations
Sub Open()
dim flags as integer = ImageCaptureObjectMBS.kICAAllowMultipleImages
dim types(-1) as string
dim m as new ImageCaptureMBS

types.Append "tif"
types.Append "tiff"
types.append "jpg"
types.append "png"

dim files(-1) as string = m.ImportImage(flags, types)

for each data as string in files
ShowPicture data
next

End Sub

// Methods
Sub ShowPicture(data as string)
dim p as Picture = JPEGStringToPictureMBS(data, true)

if p = nil then
p = TIFFStringToPictureMBS(data)
if p = nil then
p = PNGStringToPictureMBS(data, 0)
end if
end if

if p<>nil then
dim pw as new PicWindow
pw.Backdrop=p

pw.width = min(p.Width, screen(0).AvailableWidth - pw.left)
pw.height = min(p.Height, screen(0).AvailableHeight - pw.top)

pw.show
else
MsgBox "Got a picture, but failed to decode it."
end if

End Sub
End Class

Class PicWindow
Inherits Window
End Class


All movies




Links
MBS Xojo PDF Plugins