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

Platforms to show: All Mac Windows Linux Cross-Platform

ScreenshotDisplayMBS(index as Integer) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Screenshot MBS Picture Plugin 3.2 Yes Yes Yes Yes No
Function: Returns the Screenshot from the display with the given index.
Example:
Backdrop = ScreenshotDisplayMBS(0)
Notes:
Index starts at 0 for the main display.
Works on Linux only for first screen.

Plugin version 10.4 added support for multiple displays on Windows.

Some examples using this method:

Feedback, Comments & Corrections

ScreenshotFromStringMBS(Width as Integer, Height as Integer, RowBytes as Integer, data as string) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Screenshot MBS Picture Plugin 8.6 Yes Yes Yes Yes No
Function: Creates the picture from a string returnd by ScreenshotStringMBS.
Example:
dim p as Picture
dim s as string

dim w,h,r as Integer

s=ScreenshotStringMBS(w,h,r)

p=ScreenshotFromStringMBS(w,h,r,s)

Backdrop=p
Notes:
Returns nil on any error.
(for example if width, height and rowwidth doesn't fit together.)

Feedback, Comments & Corrections

ScreenshotMBS as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Screenshot MBS Picture Plugin Yes Yes Yes Yes No
Function: Returns a picture of the screen content in screen resolution.
Example:
dim p as picture
p=screenshotMBS
Notes:
For a rectangle only you can use ScreenShotRectMBS.

Plugin Version 7.2 adds Windows Vista Support.

Some examples using this method:

Feedback, Comments & Corrections

ScreenshotRectMBS(left as Integer, top as Integer, width as Integer, height as Integer, destwidth as Integer, destheight as Integer) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Screenshot MBS Picture Plugin 6.3 Yes Yes No Yes No
Function: Returns a picture of the screen rectangle in screen resolution and scales it down to the requested size.
Example:
dim p as picture
p=ScreenshotRectMBS(100,100,200,200,50,50)
Notes:
Only for Mac OS.
On Windows or Linux, please use the other ScreenshotRectMBS without the extra parameters and scale the image yourself with the scale method needed.
This function is just to do the grab and scale in one rush to save CPU time.

Does not work on Mac OS X 10.7.

See also:

Some examples using this method:

Feedback, Comments & Corrections

ScreenshotStringDisplayMBS(byref Width as Integer, byref Height as Integer, byref RowBytes as Integer, index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Screenshot MBS Picture Plugin 8.6 Yes No No Yes, macOS only No
Function: Returns a picture of the screen content in screen resolution.
Example:
dim s as string
dim w,h,r as Integer
dim index as Integer=0

s=ScreenshotStringDisplayMBS(w,h,r, index)
Notes:
Returns nil on any error.
Use ScreenshotFromStringMBS to get the picture from the string.

Feedback, Comments & Corrections

ScreenshotStringMBS(byref Width as Integer, byref Height as Integer, byref RowBytes as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Screenshot MBS Picture Plugin 8.6 Yes Yes Yes Yes No
Function: Returns a picture of the screen content in screen resolution.
Example:
dim s as string
dim w,h,r as Integer
s=ScreenshotStringMBS(w,h,r)
Notes:
Returns nil on any error.
Use ScreenshotFromStringMBS to get the picture from the string.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Picture Plugin.




Links
MBS Xojo blog