Platforms to show: All Mac Windows Linux Cross-Platform

Back to Application class.

Application.OverlayApplicationDockTileImageMBS(pic as CGImageMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 2.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds a picture on top of the application dock title.
Example
static n as Integer // global property
dim p as picture
dim m as picture
dim g as graphics
dim s as string
dim w,h,x as Integer

n=n+1 // add one
s=str(n)
m=New Picture(128,128,32)
p=New Picture(128,128,32)

g=p.graphics
g.textsize=24
w=g.stringwidth(s)
h=g.stringheight(s,0)
x=125-w-10
g.foreColor=rgb(255,0,0)
g.fillRoundRect x,10,10+w,10+h,20,20
g.foreColor=rgb(0,0,0)
g.drawstring s,x+5,15+g.textascent

g=m.graphics
g.foreColor=rgb(0,0,0)
g.fillRoundRect x,10,10+w,10+h,20,20

if app.OverlayApplicationDockTileImageMBS(CGCreateImageMBS(p,m)) then
end if

Changed in MBS Plugin 2.7 to use CGImages directly.
Added support for 64-bit in plugin version 16.0.

Some examples using this method:

Blog Entries

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


The biggest plugin in space...