DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: Carriage return

  1. #1
    Join Date
    Nov 2004
    Posts
    43

    Carriage return

    In my last thread I wrote about having printing problems I feel that I have the printing taken care of. I feel that it is more a carriage return problem. In one of the feilds in my database the data is entered like this on a single line with spaces it would look like this:

    KF 123 O456 1972

    Where ever there is a space I would like a carriage return so that when it is printed it will look like this:

    KF
    123
    O456
    1972

  2. #2
    Join Date
    Nov 2004
    Posts
    43

    Carriage return

    Code:
    Imports System.Drawing.Printing
    Public Class Form1
        Private Sub printtext(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
            ev.Graphics.DrawString(TextBox1.Text, New Font("arial", 11, FontStyle.Regular), Brushes.Black, 120, 120)
            ev.HasMorePages = False
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Try
                Dim PrintDoc As New PrintDocument
                AddHandler PrintDoc.PrintPage, AddressOf Me.printtext
                PrintDoc.Print()
            Catch ex As Exception
                MessageBox.Show("Sorry won't print", ex.ToString())
            End Try
        End Sub
    End Class
    I am trying to enter the carriage return and line feed into this area of the text TEXTBOX1.TEXT & VBCRLF but it does not work what do I need to do.

Similar Threads

  1. Switch Statement..return problem
    By XanFox in forum Java
    Replies: 3
    Last Post: 04-14-2011, 09:03 PM
  2. Replies: 0
    Last Post: 05-22-2007, 02:19 AM
  3. Getting a GUI to run
    By Eric in forum Java
    Replies: 4
    Last Post: 04-14-2006, 09:09 AM
  4. Input string was not in a correct format
    By mdengler in forum ASP.NET
    Replies: 0
    Last Post: 11-26-2002, 02:32 PM
  5. Getting a GUI to function
    By Eric in forum Java
    Replies: 1
    Last Post: 11-27-2001, 06:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links