ImageCapture Source

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /kunden/ on line 244
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

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.width = min(p.Width, screen(0).AvailableWidth - pw.left)
pw.height = min(p.Height, screen(0).AvailableHeight -
MsgBox "Got a picture, but failed to decode it."
end if

End Sub
End Class

Class PicWindow
Inherits Window
End Class

Watch other Xojo videos:

ThumbnailMBS Xojo Plugin, June 2021 News


27:58 minutes
ThumbnailMBS Xojo Plugins 21.1


23:12 minutes
ThumbnailInstalling a Xojo Web App Server


28:19 minutes
ThumbnailMBS Plugin Installation Win


22:03 minutes
ThumbnailMBS Plugin Installation Mac


25:17 minutes
ThumbnailXDC 2020 MBS Plugins Presentation


38:59 minutes

MBS Xojo Plugins

Start Chat