Platforms to show: All Mac Windows Linux Cross-Platform

WindowsPreviewHandlerMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Windows MBS Win Plugin 12.3 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The class for showing previews on windows.

This is linke a control which you can put into a window to show a preview for a file.

Uses IPreviewHandler class from Microsoft, so also see here:
https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ipreviewhandler
https://docs.microsoft.com/de-de/windows/win32/shell/preview-handlers

The preview handlers we find are those listed in the registry here:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers

See WinPreviewControlMBS control to use this class as a control.

  • 6 properties
  • 23 methods
    • method Constructor(ClassID as string)
    • method DoPreview
    • method InitWithData(data as MemoryBlock)
    • method InitWithData(data as string)
    • method InitWithFile(file as folderitem)
    • method SetBackgroundColor(red as Integer, green as Integer, blue as Integer)
    • method SetFocus
    • method SetFont(size as Integer, font as string)
    • method SetRect(left as Integer, top as Integer, width as Integer, height as Integer)
    • method SetTextColor(red as Integer, green as Integer, blue as Integer)
    • method SetWindow(win as ContainerControl)
    • method SetWindow(win as ContainerControl, left as integer, top as integer, width as integer, height as integer)
    • method SetWindow(win as Control)
    • method SetWindow(win as Control, left as integer, top as integer, width as integer, height as integer)
    • method SetWindow(win as DesktopContainer)
    • method SetWindow(win as DesktopContainer, left as integer, top as integer, width as integer, height as integer)
    • method SetWindow(win as DesktopControl)
    • method SetWindow(win as DesktopControl, left as integer, top as integer, width as integer, height as integer)
    • method SetWindow(win as DesktopWindow)
    • method SetWindow(win as DesktopWindow, left as integer, top as integer, width as integer, height as integer)
    • method SetWindow(win as Window)
    • method SetWindow(win as window, left as Integer, top as Integer, width as Integer, height as Integer)
    • method Unload

This class has no sub classes.

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


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


WindowsPowerStateMBS   -   WindowsPrintDialogMBS


The biggest plugin in space...