Visual Basic .NET Forums    

Go Back   Visual Basic .NET Forums > Components & Controls > Reporting / Printing

VB.NET Forums Newsletter Signup:
Email address:


Reporting / Printing Discussion on output-creation components such as reporting, pdf, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-09-2008, 5:23 PM
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2008
Posts: 16
Reputation: 12
Musab is on a distinguished programming path ahead
Default Need help in Print Dialog (check boxes printing)

Hello,

I have been looking at some tutorials about using the print dialog, and I was able to print a text in a RichTextBox using the following code:

Printing in VB .NET - Print Dialog, PrintPreview Dialog, PrintPreview Sample Code Control, PageSetup Dialog

What I'm trying to do is print labels in my software, for exmaple

Name: NickName:
*Check Box1 *CheckBox2

so basically its a form and right now its working great, but 1 step is left is to make it print the label showing the checked chkBoxes and textboxes ..etc

Any Idea or a good tutorial will help. Thanks bunch !
Reply With Quote
  #2 (permalink)  
Old 10-09-2008, 9:01 PM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 36
Posts: 8,138
Reputation: 876
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Three options you can look into:
  • Control.DrawToBitmap
  • ControlPaint.DrawCheckBox
  • CheckBoxRenderer.DrawCheckBox
__________________
See this thread about how to use forum markup codes for code blocks etc (present the problem/post properly )
Some useful links: Learning videoes, WMI Code Creator, MSDN, The Code Project, WindowsClient.net, ASP.net, W3 Schools, Regular-Expressions.info, GDI+ FAQ


DR. WEIR: Download it to a non-networked, firewalled computer.
TECHNICIAN: Yes, ma'am.
Reply With Quote
  #3 (permalink)  
Old 10-29-2008, 7:52 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Oct 2008
Posts: 18
Reputation: 5
acidflash is on a distinguished programming path ahead
Default

Another option is downloading VB.net powerpacks, and using the printform() function in it (very helpful). What it does is, it just prints the entire form with everything on it. What you can do to get the results you want is for example

'Say you wanted to print a word where a label is
Label1.text = "Blah" 'or Blah (where Blah is a saved string somewhere)

'Say you wanted to put the checkbox as checked, you just do this

checkbox1.checked = true
PrintForm()
checkbox1.checked = false

That way your checkbox is checked when you print, and unchecked when the printing is finished. Good luck, I hope that helped. Remember, Visual Basic .NET Powerpacks (3.0 or 2.0)
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 3:40 AM.




Click to advertise here

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
For advertising opportunities click here.