Need help with text

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2007
Posts: 2
Reputation: tamik0 is an unknown quantity at this point 
Solved Threads: 0
tamik0 tamik0 is offline Offline
Newbie Poster

Need help with text

 
0
  #1
Oct 4th, 2007
I need help declaring the DrawStringInBox (in bold), can't seem to figure out how to do it, any suggestions would be greatly appreciated:


Protected Sub PrintPageTitles(ByVal ev As System.Drawing.Printing.PrintPageEventArgs)
Dim psngWidth As Single = 0
Dim penLine As Pen = New Pen(Brushes.Black)
Dim recCurrent As RectangleF
Dim sfCurrent As New StringFormat
Dim msngYPos As Single


ev.Graphics.DrawRectangle(penLine, _
ev.PageBounds.Left + 100, _
ev.PageBounds.Top + 100, _
ev.PageBounds.Right - 200, _
ev.PageBounds.Bottom - 200)


mfntPrint = New Font("Arial", 14)
msngYPos = ev.MarginBounds.Top + _
(2 * mfntPrint.GetHeight(ev.Graphics))


recCurrent = New RectangleF(ev.MarginBounds.Left, _
ev.MarginBounds.Top, _
ev.MarginBounds.Right - 100, _
msngYPos)

sfCurrent.Alignment = StringAlignment.Center
ev.Graphics.DrawString("Depreciation Schedule", _
mfnrPrint, _
Brushes.Black, _
recCurrent, sfCurrent)


mfntPrint = New Font("Arial", 10)


msngFontHeight = mfntPrint.GetHeight(ev.Graphics)
msngYPos += msngFontHeight



Call DrawStringInBox(ev, cintCol1Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
"Year")

Call DrawStringInBox(ev, cintCol2Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
"Start Value")

Call DrawStringInBox(ev, cintCol3Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
"Depreciation")

Call DrawStringInBox(ev, cintCol4Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
"End Value")

End Sub
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: Need help with text

 
0
  #2
Oct 4th, 2007
  1. mfntPrint = New Font("Arial", 14, FontStyle.Bold)
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC