i've been working around with Desktop Windows printing and
i've got this small piece of code witch helps me a lot when
i want to print the active window
I'm using the door.dll and the RichTextBoxDesktop.dll
In this example:
1-Open a window called Form3 (with 800x548 in the sample)
and place there a PRINT button (Button1 in the sample)
2-Add obj as object and rtb as RichTextBoxDesktop
Sub Globals
End Sub
Sub App_Start
rtb.New1("Form3",0,0,800,548)
rtb.Landscape = True
obj.New1(False)
obj.CreateNew("System.Windows.Forms.SendKeys" & obj.System_Windows_Forms)
form3.show
End Sub
Sub Button1_Click
obj.RunMethod2("SendWait","%{PRTSC}","System.String") 'send ALT + PRINTSCREEN key.
RTb.Clear
RTb.Visible = False
RTb.PasteBitmap
RTb.PrintPreview
End Sub
Hope it can be usefull for someone
i've got this small piece of code witch helps me a lot when
i want to print the active window
I'm using the door.dll and the RichTextBoxDesktop.dll
In this example:
1-Open a window called Form3 (with 800x548 in the sample)
and place there a PRINT button (Button1 in the sample)
2-Add obj as object and rtb as RichTextBoxDesktop
Sub Globals
End Sub
Sub App_Start
rtb.New1("Form3",0,0,800,548)
rtb.Landscape = True
obj.New1(False)
obj.CreateNew("System.Windows.Forms.SendKeys" & obj.System_Windows_Forms)
form3.show
End Sub
Sub Button1_Click
obj.RunMethod2("SendWait","%{PRTSC}","System.String") 'send ALT + PRINTSCREEN key.
RTb.Clear
RTb.Visible = False
RTb.PasteBitmap
RTb.PrintPreview
End Sub
Hope it can be usefull for someone
Last edited: