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 |
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
- property Handle as Integer
- property Lasterror as Integer
- property LasterrorString as String
- property SupportsDataLoading as Boolean
- property SupportsFileLoading as Boolean
- property Window as Variant
- 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
- MBS Xojo Plugins, version 23.3pr4
- PDF Viewer control for Windows
- MBS Xojo Plugins, version 23.3pr2
- MBS Xojo Plugins, version 22.4pr5
- MBS Xojo Plugins, version 21.6pr3
- MonkeyBread Software Releases the MBS Real Studio plug-ins in version 12.3
- MBS Real Studio Plugins, version 12.3pr11
- File Previews on Windows
Xojo Developer Magazine
Release notes
- Version 23.3
- Added more SetWindow variants to WindowsPreviewHandlerMBS class.
- Version 22.4
- Changed WindowsPreviewHandlerMBS to automatically call unload for you in destructor in case you forgot.
- Version 22.0
- Changed window properties to variant, so you can use DesktopWindow there for WindowsShortCutMBS, WindowsPrintDialogMBS, WindowsPageSetupDialogMBS, WindowsICMSetupMBS, WindowsBlueToothSelectDeviceDialogMBS, TwainMBS, TaskDialogMBS, OpenDialogMBS, DirectShowVideoWindowMBS, WindowsStoreContextMBS, WindowsFileCopyMBS, WindowsFontDialogMBS, WindowsPreviewHandlerMBS, WindowsStoreContextMBS, ParentChromiumFrameMBS and ChromiumBrowserMBS classes.
The items on this page are in the following plugins: MBS Win Plugin.
WindowsPowerStateMBS - WindowsPrintDialogMBS