|
-
Apr 14th, 2003, 09:05 AM
#1
Thread Starter
Lively Member
Form.Print is no more
Hi,
what is the vb.net version of Form.Print?
Cheers,
Hugh Rees
SERTEV Technologies
(07) 3375 9806
0410 585 754
WWW.SERTEV.COM
-
Apr 15th, 2003, 12:43 PM
#2
Frenzied Member
I have no idea. What did it do in VB6? (obviously i never used that feature)
Have you tried making a small sample VB6 app that uses it, and then converting that app into VB.NET?
~Peter

-
Apr 15th, 2003, 12:51 PM
#3
Fanatic Member
If you are doing Web Programming - there is a Javascript function to print that will print the page.
Haven't come across anything in win forms in vb.net, - haven't really had the need - especially with the Crystal Reports integration.
-
Apr 15th, 2003, 01:49 PM
#4
PowerPoster
A simple search for print form vb.net in the MSDN library gave me this:
http://msdn.microsoft.com/library/de...entcontrol.asp
Basically, I would use the info in that link to print the form. Get the graphics object of the form, then print that.
-
Apr 15th, 2003, 01:59 PM
#5
Addicted Member
Originally posted by MrGTI
I have no idea. What did it do in VB6? (obviously i never used that feature)
Form1.Print is used to display text on the form
If you had:
Then the form would look like this:
-----------Form-----------
Text
-----------Form-----------
-
Apr 15th, 2003, 02:44 PM
#6
PowerPoster
Ohhh, if you are just printing text on the form, then you will need to use the forms graphics object and use the drawstring method.
-
Apr 15th, 2003, 04:19 PM
#7
Addicted Member
So how would you Print text on the form using forms graphics object?
-
Apr 15th, 2003, 04:25 PM
#8
PowerPoster
I will get an example, hold on.
-
Apr 15th, 2003, 04:38 PM
#9
PowerPoster
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.DrawString("This is my string", Font, New SolidBrush(SystemColors.WindowText), 50, 50)
End Sub
-
Apr 15th, 2003, 10:19 PM
#10
Thread Starter
Lively Member
wrong track
sorry every one. i got you on the wrong track.
I ment to say form.printform. This prints out the current form with all its contents.
I want to use this in stead of crystal reports. Crystal reports is giving me no joy at all.
any idea's
Cheers
Hugh Rees
SERTEV Technologies
(07) 3375 9806
0410 585 754
WWW.SERTEV.COM
-
Apr 16th, 2003, 07:33 AM
#11
Sleep mode
I's sure you're talking about it ! This prints the whole form with all controls . anyways , it's no longer in .NET BUT there must be a way though . Let me check some resource out there . Hope I find an answer !
-
Apr 16th, 2003, 09:12 AM
#12
Frenzied Member
Now i know why i never used the .Print method. 
The idea of .PrintForm seems interesting though,....
~Peter

-
Apr 16th, 2003, 09:30 AM
#13
PowerPoster
Originally posted by hellswraith
A simple search for print form vb.net in the MSDN library gave me this:
http://msdn.microsoft.com/library/de...entcontrol.asp
Basically, I would use the info in that link to print the form. Get the graphics object of the form, then print that.
http://searchvb.techtarget.com/vsnet...293474,00.html
http://www.dotnetnut.com/mb-detail.asp?Id=120
http://www.c-sharpcorner.com/Code/20...rmPrinting.asp
Do any of these links do anything for you? I did a simple search on google for "print form vb.net". There are more.
-
Apr 16th, 2003, 10:35 AM
#14
I wonder how many charact
Funny thing is, I wonder if you can somehow make a copy of the graphics object of a form... and set the printer.graphics property to that.... unfortunately, its a read-only property....
However, it seems mostly possible.... since there is a component available on the web that prints VB.NET forms....
"How does PrintForm for .NET work? By hooking into the printing mechanism of the .NET runtime it is able to draw the controls on your Form straight to the PrintPreviewDialog or Printer. All you have to do is drop the PrintForm component onto a Windows Form and point it at the Container Control to print (Form, Panel, GroupBox etc), PrintForm takes care of the rest!
Want to see some examples of what it can do? View the PrintForm feature list, watch the product tour, or see some screenshots "
http://www.winformreports.co.uk/screenshots_pf.htm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|