Platforms to show: All Mac Windows Linux Cross-Platform

/Win/HTMLViewer Windows/More HTMLViewer Printing


Required plugins for this example: MBS Win Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/HTMLViewer Windows/More HTMLViewer Printing

This example is the version from Tue, 6th Jul 2015.

Project "More HTMLViewer Printing.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
EventHandler Sub Open() if not TargetWin32 then MsgBox "This example is for Windows only." end if End EventHandler
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() dim p as new Picture(HTMLViewer1.Width, HTMLViewer1.Height, 32) dim g as Graphics = p.Graphics dim h as integer = g.Handle(g.HandleTypeHDC) if h = 0 then MsgBox "no handle?" Return end if dim ph as ptr = ptr(h) dim b as Boolean = HTMLViewer1.IEDrawToHDCMBS(ph,"") if b then dim pw as new PicWindow pw.Backdrop = p pw.show end if End EventHandler
End Control
Control HTMLViewer1 Inherits HTMLViewer
ControlInstance HTMLViewer1 Inherits HTMLViewer
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() dim g as Graphics = OpenPrinter if g = nil then MsgBox "Failed to open printer" Return end if dim h as integer = g.Handle(g.HandleTypeHDC) if h = 0 then MsgBox "no handle?" Return end if dim ph as ptr = ptr(h) dim PrinterName as string = WindowsPrinterMBS.GetDefaultPrinter dim b as Boolean = HTMLViewer1.IEDrawToHDCMBS(ph, PrinterName) End EventHandler
End Control
EventHandler Sub Open() HTMLViewer1.LoadURL "http://www.monkeybreadsoftware.de/" End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
Class PicWindow Inherits Window
End Class
End Project

See also:

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


The biggest plugin in space...