[quote=191324:@shao sean]I added the XFIcons module to XF Classes web page… Usage should be simple enough… Width and height defaults to 32 pixels…
All examples are in the Paint event of a canvas…
Show the Info icon using the default width and height
g.DrawPicture XFIcons.Info, 0, 0, 32, 32
Show the info icon at 512 pixels
g.DrawPicture XFIcons.Info(512, 512), 0, 0, 512, 512
There are many more system icons that are available for use, but you can also show an icon based on a file type or UTI…
Show PNG file icon using the file type and using the default size
g.DrawPicture XFIcons.FromFileType("png"), 0, 0, 32, 32
Show HTML file icon using the UTI and using a size of 128
g.DrawPicture XFIcons.FromFileType("public.html", 128, 128), 0, 0, 128, 128
And finally, you can load the contents of an image file and display it
DIM path As NEW FolderItem("/Library/Desktop\\ Pictures/Abstract.jpg", FolderItem.PathTypeShell)
g.DrawPicture XFIcons.FromFolderItem(path, 512, 512), 0, 0, 512, 512
[/quote]
Thank you, perfect!
Simon.