By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,680 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,680 IT Pros & Developers. It's quick & easy.

drawstring with line wrapping?

P: n/a
I need to use drawstring, but it always draws one line, and I need to divide
it. to give it a specified width which it doesnt cross, but starts another
line.
is it possible?

thanks
daniel
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
DrawString is overloaded to allow a StringFormat to be used with it. Play
with that.
"Danie" <dc*****@gmx.net> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
I need to use drawstring, but it always draws one line, and I need to divide it. to give it a specified width which it doesnt cross, but starts another
line.
is it possible?

thanks
daniel

Nov 20 '05 #2

P: n/a
is it able to do what i want?
thanks

"Stephen" <gr******@bellatlantic.net> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
DrawString is overloaded to allow a StringFormat to be used with it. Play
with that.
"Danie" <dc*****@gmx.net> wrote in message
news:Oz**************@TK2MSFTNGP12.phx.gbl...
I need to use drawstring, but it always draws one line, and I need to

divide
it. to give it a specified width which it doesnt cross, but starts another line.
is it possible?

thanks
daniel


Nov 20 '05 #3

P: n/a
"Danie" <dc*****@gmx.net> scripsit:
I need to use drawstring, but it always draws one line, and I need to divide
it. to give it a specified width which it doesnt cross, but starts another
line. is it possible?


\\\
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
e.Graphics.DrawString("Hello World Hello World Hello World", Me.Font, Brushes.Red, New RectangleF(0, 0, 40, 200))
End Sub
///

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

P: n/a
thanks
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
"Danie" <dc*****@gmx.net> scripsit:
I need to use drawstring, but it always draws one line, and I need to divide it. to give it a specified width which it doesnt cross, but starts another line. is it possible?
\\\
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As

System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint e.Graphics.DrawString("Hello World Hello World Hello World", Me.Font, Brushes.Red, New RectangleF(0, 0, 40, 200)) End Sub
///

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.