473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Drawing lines other than with "-"

In an invoicing program I draw lines in a text file
using:

new string ("-",73)
new string ("=",73)

These lines look awful.
Is there a better way?

Much obliged.
Zach.
Nov 17 '05 #1
10 2299
Had you thought about outputting HTML? You can only use the characters in a
text file but an invoice rendered in HTML can be as rich as you like.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Zach" <00@00.00> wrote in message
news:9e***************************@freeler.nl...
In an invoicing program I draw lines in a text file
using:

new string ("-",73)
new string ("=",73)

These lines look awful.
Is there a better way?

Much obliged.
Zach.

Nov 17 '05 #2
I don't want to get into HTML.

Re alternatives for:

new string ("-",73)

Can one use unicode (&#151??) If so, how
should that be done, please give example code.

Many thanks.

Zach.
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:eB*************@TK2MSFTNGP15.phx.gbl...
Had you thought about outputting HTML? You can only use the characters in a text file but an invoice rendered in HTML can be as rich as you like.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Zach" <00@00.00> wrote in message
news:9e***************************@freeler.nl...
In an invoicing program I draw lines in a text file
using:

new string ("-",73)
new string ("=",73)

These lines look awful.
Is there a better way?

Much obliged.
Zach.


Nov 17 '05 #3
Zach wrote:
In an invoicing program I draw lines in a text file
using:

new string ("-",73)
new string ("=",73)

These lines look awful.
Is there a better way?

Much obliged.
Zach.


What about underscores?
_______________________
Nov 17 '05 #4
It used to be that character sets had all sorts of cool things in. That's
not much of an option these days because almost everything is proportional.
Aside from John's suggestion of underscores for horizontal lines and pipes
'|' for vertical lines I have nothing to suggest.

Maybe you can use some wingdings??

Sorry.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Zach" <00@00.00> wrote in message
news:d6***************************@freeler.nl...
I don't want to get into HTML.

Re alternatives for:

new string ("-",73)

Can one use unicode (&#151??) If so, how
should that be done, please give example code.

Many thanks.

Zach.
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:eB*************@TK2MSFTNGP15.phx.gbl...
Had you thought about outputting HTML? You can only use the characters in

a
text file but an invoice rendered in HTML can be as rich as you like.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Zach" <00@00.00> wrote in message
news:9e***************************@freeler.nl...
> In an invoicing program I draw lines in a text file
> using:
>
> new string ("-",73)
> new string ("=",73)
>
> These lines look awful.
> Is there a better way?
>
> Much obliged.
> Zach.
>
>



Nov 17 '05 #5
Hey,

What about drawing them, enough API in .NET to do that.

TT
"John Davison" wrote:
Zach wrote:
In an invoicing program I draw lines in a text file
using:

new string ("-",73)
new string ("=",73)

These lines look awful.
Is there a better way?

Much obliged.
Zach.


What about underscores?
_______________________

Nov 17 '05 #6
I am using Courier with proportional spacing.

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:#P**************@TK2MSFTNGP15.phx.gbl...
It used to be that character sets had all sorts of cool things in. That's
not much of an option these days because almost everything is proportional. Aside from John's suggestion of underscores for horizontal lines and pipes
'|' for vertical lines I have nothing to suggest.

Maybe you can use some wingdings??

Sorry.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Zach" <00@00.00> wrote in message
news:d6***************************@freeler.nl...
I don't want to get into HTML.

Re alternatives for:

new string ("-",73)

Can one use unicode (&#151??) If so, how
should that be done, please give example code.

Many thanks.

Zach.
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:eB*************@TK2MSFTNGP15.phx.gbl...
Had you thought about outputting HTML? You can only use the characters
in a
text file but an invoice rendered in HTML can be as rich as you like.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Zach" <00@00.00> wrote in message
news:9e***************************@freeler.nl...
> In an invoicing program I draw lines in a text file
> using:
>
> new string ("-",73)
> new string ("=",73)
>
> These lines look awful.
> Is there a better way?
>
> Much obliged.
> Zach.
>
>



Nov 17 '05 #7
So my conclusion should be that it isn't possible
and I am left with ...new string ('-', number_off);

??
Nov 17 '05 #8
Re the post below: The function gives ---
i.e. a discontinuous and ugly line. I would
wish to draw a continuous line, however
not using underscores, which would be
an option, because then you get the line
too low. The line is drwan in a text file
which I print. I do not wish to use HTML,
with which I understand the problem could
be solved, because the application is
written and I do not want to rewrite the
whole thing.

Zach.
"Zach" <00@00.00> wrote in message
news:3a***************************@freeler.nl...
So my conclusion should be that it isn't possible
and I am left with ...new string ('-', number_off);

??

Nov 17 '05 #9
i havent tried this, but how about using the
ascii drawing chars? (i cant find them in Word)
or the Em dash (ascii 151)

--
Grace + Peace,
Peter N Roth
Engineering Objects International
http://engineeringobjects.com
Home of Matrix.NET
"Zach" <00@00.00> wrote in message
news:b5***************************@freeler.nl...
Re the post below: The function gives ---
i.e. a discontinuous and ugly line. I would
wish to draw a continuous line, however
not using underscores, which would be
an option, because then you get the line
too low. The line is drwan in a text file
which I print. I do not wish to use HTML,
with which I understand the problem could
be solved, because the application is
written and I do not want to rewrite the
whole thing.

Zach.
"Zach" <00@00.00> wrote in message
news:3a***************************@freeler.nl...
So my conclusion should be that it isn't possible
and I am left with ...new string ('-', number_off);

??


Nov 17 '05 #10
(char)151 draws funnies on the screen and prints enigmas.

"Peter N Roth" <re***********@mycompany.com> wrote in message
news:OA*************@TK2MSFTNGP12.phx.gbl...
i havent tried this, but how about using the
ascii drawing chars? (i cant find them in Word)
or the Em dash (ascii 151)

--
Grace + Peace,
Peter N Roth
Engineering Objects International
http://engineeringobjects.com
Home of Matrix.NET
"Zach" <00@00.00> wrote in message
news:b5***************************@freeler.nl...
Re the post below: The function gives ---
i.e. a discontinuous and ugly line. I would
wish to draw a continuous line, however
not using underscores, which would be
an option, because then you get the line
too low. The line is drwan in a text file
which I print. I do not wish to use HTML,
with which I understand the problem could
be solved, because the application is
written and I do not want to rewrite the
whole thing.

Zach.
"Zach" <00@00.00> wrote in message
news:3a***************************@freeler.nl...
So my conclusion should be that it isn't possible
and I am left with ...new string ('-', number_off);

??



Nov 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: T. F. | last post by:
Hi, I need to create a box / field that the user can draw into (with some kind of pen). I also need to know how I can edit the size of the pen style and how I can "transport" the drawn image...
2
by: Champika Nirosh | last post by:
Hi, I want to create drawing board application that can draw Line, rectagle, circle and free hand drawing. Each drawing need to be transparent, moveable (draggable), have bring to front and...
6
by: James dean | last post by:
I have heard that the video drivers in GDI+ are a big performance issue. But is this only an issue with something like Games Programming i think...is this wrong?. What about a drawing application...
2
by: George | last post by:
Dear colleagues, I refer to your help with specific graphic problem. It is necessary to create a viewfinder in graphic application. It seems that the algorithm is simple: just draw lines in...
9
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I...
4
by: Galen Somerville | last post by:
My VB2005 app gets real time Heart sounds and an ECG from a USB device. I'm looking for a way to speed up the drawing of the traces on the screen. In the following code the routine GetSounds...
4
by: Peter | last post by:
Hi, I remember in VB6 that one could simply draw a line in a picturebox using the .Line method. There is no equivalent in .NET; everything I read says it is necessary to do lots of heavily...
4
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've windows form, in this form i've a panel. I want to draw lines inside the panel using the panel coordinates( meaing that the left upper corner of the panel is 0,0), how can i do it? ...
1
by: YouPoP | last post by:
I am doing an app (C# 2.0) where you can draw in a panel with your mouse in "real time". I actually have 2 problems; 1- it does not really is "real time", if your mouse move fast or very fast the...
5
by: Macias | last post by:
Hi, Please help me, how I can make a line drawing on PictureBox similar to MS paint. I thinking about this: click and hold button, move mouse and relase button. I'm trying useing this...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.