|
-
Jul 5th, 2004, 10:26 AM
#1
Thread Starter
New Member
Solution for PrintForm in .NET
-
Jul 5th, 2004, 05:08 PM
#2
Fanatic Member
What's the address to that newsgroup?
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Jul 6th, 2004, 02:35 AM
#3
Pretty Cool
Except, it can't do combo's and listview's and other controls of that nature.
You wouldn't happen to have a fix for that?
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Jul 6th, 2004, 03:39 AM
#4
Thread Starter
New Member
Address of the newsgroup (taken from Google) is
microsoft.public.dotnet.languages.vb
I'm afraid other controls still have to be drawn from code with simple drawstring, etc functions. At least at the moment I don't know the other way 
But this code helped me when I was stuck printing invisible control that does custom drawing under OnPaint event
-
Jul 6th, 2004, 05:30 PM
#5
Fanatic Member
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Jul 7th, 2004, 12:47 AM
#6
Junior Member
ok, I'm new to vb but not programming, but i'm also an idiot.
whenever i call this method from inside a PrintPage event and pass it the Form as the control it wants(casted or not), I use the bitmap it returns and it's always blank. Any idea why? or maybe I'm using it wrong.
I used the BitBlt way, and it captures the GDI+ lines, etc. that I already have drawn on the form, but it also captures things on top of the form, like the stupid "generating preview" dialog box or sometimes taskbar.
arrrgh, i just want to print whats on the form. this "screenshot" way, or variants of it, seem to be the only way to do it too.
-
Jul 7th, 2004, 12:55 AM
#7
Angrycoder: You need to do the screenshot and save it in a variable before opening the printpreview.
It sounds like you grab it in the PrintPage event or something.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
-
Jul 7th, 2004, 04:08 AM
#8
Thread Starter
New Member
Angrycoder: you have to pass every control on the form one-by-one. It then gives you bitmap that this control draws under its OnPaint event.
-
Jul 7th, 2004, 03:51 PM
#9
Junior Member
yeah, I have a form with no controls on it, only stuff drawn on it with GDI+. So I took pax's advice and used the BitBlt way and it works. Thanks guys.
-
Jul 8th, 2004, 03:08 AM
#10
Thread Starter
New Member
Sure BitBlt is the easiest way if you have visible form
-
Jul 11th, 2004, 10:01 PM
#11
Junior Member
I thought this way would be better though, since I'm trying to correctly scale it to a sheet of paper (and handling all screen resolutions, bleh). even resizing the bitmap by interpolating and using antialiasing it still looks a bit grainy. but if I use this way and pass the form as the control i want to become a bitmap, it seems to ignore lines i've drawn on it, and returns a blank bitmap
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
|