Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Picture/Icon/Register Icon
Function:
Required plugins for this example: MBS Picture Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Picture/Icon/Register Icon
This example is the version from Sun, 10th Dec 2016.
Project "Register Icon.rbp"
Class Window1 Inherits Window
EventHandler Sub Open() dim f as IconFamilyMBS dim i as IconMBS dim p,m as Picture dim g as Graphics // Create and register the icon p = new Picture(128,128,32) g=p.Graphics g.ForeColor=Rgb(255,0,0) g.Filloval 0,0,128,128 m = new Picture(128,128,32) g=m.Graphics g.ForeColor=Rgb(255,0,0) g.Filloval 0,0,128,128 f=NewIconFamilyMBS f.Thumbnail32BitData=p f.Thumbnail8BitMask=m i=f.Register("TApp","Test") Title=str(f.LastError) i.Release=false // leak it in memory, so it's not destroyed. End EventHandler
EventHandler Sub Paint(g As Graphics, areas() As REALbasic.Rect) dim i as IconMBS // Now use it. // This is called after the Open Event! i=new IconMBS("TApp","Test") i.DrawIcon(g,0,0,128,128) End EventHandler
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

Feedback, Comments & Corrections

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




Links
MBS FileMaker blog