Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > .NET

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-21-2009, 04:25 PM
COMPCAD COMPCAD is offline
Registered User
 
Join Date: Nov 2004
Posts: 22
Smile multiline textbox to printdocument

I need help trying to print a single multiline textbox onto a sheet of plain paper. I can print the textbox to the paper and it prints fine as a single line. The problem is when I go into properties and set the textbox for multiline and I hit the green run button at the top of the page. The textbox picks up the data from the database fine and the multilined textbox on the screen works fine each word goes to a new line. It is just when I go to print.document the text only comes out in a single line on the plain paper. I want each word to print on a new line on the plain paper. what is the easist way to word wrap this text within the textbox to the printer. What code ideas do you have that I may try.

I am using VB.NET 2008.

I am creating a windows application.

I am using the printdocument control.
Reply With Quote
  #2  
Old 10-21-2009, 07:56 PM
COMPCAD COMPCAD is offline
Registered User
 
Join Date: Nov 2004
Posts: 22
multiline textbox to printdocument

To better discribe what I am trying to do starting with what shows up on the desktop.

1. I open a new FORM1 IN VB 2008

2. I first drag a Button1 on to the form

3. Next I drag a TextBox1 on to the form

4. I then go to the properties for the textbox and set the MultiLine = True
and the Size = 32, 62

5. I then bind the DataBase I am using to the textbox

6. The feild in the database has some data that looks like this:
KF 123 O456 1972

7. I then hit Run at the top of VB and when theprogram runs the data in the textbox looks like this:

KF
123
O456
1972

This is how I want the data in the textbox on the desktop to look and the problem I am having is to get the data in step 7. to print out the same way but right now it is printing out like step 6. on the printer. I am using PrintDocument and puting the code in Button1. I am using Graphics.DrawString in my code if you would like to see the code I could send it later tonight
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
word wrap - multiline textbox to printer COMPCAD .NET 4 10-21-2009 04:20 PM
Search for strings in multiline textbox sam510 VB Classic 1 12-17-2007 07:54 AM
Multiline textbox, scrolling to a Line and editing Line guptan .NET 1 07-07-2006 06:37 AM
MultiLine TextBox Piyush Gupta VB Classic 18 07-20-2001 03:42 PM
MultiLine TextBox Piyush Gupta VB Classic 0 07-19-2001 01:16 AM


All times are GMT -4. The time now is 08:16 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.