944,056 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 600
  • VB.NET RSS
Oct 4th, 2007
0

Need help with text

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tamik0 is offline Offline
2 posts
since Sep 2007
Oct 4th, 2007
0

Re: Need help with text

VB.NET Syntax (Toggle Plain Text)
  1. mfntPrint = New Font("Arial", 14, FontStyle.Bold)
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: tabPage.Add(textBox) ?
Next Thread in VB.NET Forum Timeline: Print Help!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC