Printing a Form -> Texbox is emty :(
-
Hi, i have serious problems to print a Windows Form with some Textboxes... The printing should work in background... I really can't find a working solution.. so please help me!!! ' that form with textbox controls Dim rForm As MyForm = New MyForm () ' image to save / or to print formImage = New Bitmap(rForm.Width, rForm.Height) Dim rec As New Rectangle(0, 0, formImage.Width, formImage.Height) 'print the form rForm.DrawToBitmap(formImage, rec) 'save as image formImage.Save("d:\screen.bmp") The code can be on c# or vb.net!!! Thank's for your answers!!!
-
Hi, i have serious problems to print a Windows Form with some Textboxes... The printing should work in background... I really can't find a working solution.. so please help me!!! ' that form with textbox controls Dim rForm As MyForm = New MyForm () ' image to save / or to print formImage = New Bitmap(rForm.Width, rForm.Height) Dim rec As New Rectangle(0, 0, formImage.Width, formImage.Height) 'print the form rForm.DrawToBitmap(formImage, rec) 'save as image formImage.Save("d:\screen.bmp") The code can be on c# or vb.net!!! Thank's for your answers!!!
Hi To print window form you have to use window API This may help you http://www.knowdotnet.com/articles/printform.html[^] Atul Kumar