Need vb text help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tamik0
    New Member
    • Sep 2007
    • 3

    Need vb text help

    I need to declare the "DrawStringInBo x" (in bold) but not sure how, any suggestions would be greatly appreciated:


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

    ev.Graphics.Dra wRectangle(penL ine, _
    ev.PageBounds.L eft + 100, _
    ev.PageBounds.T op + 100, _
    ev.PageBounds.R ight - 200, _
    ev.PageBounds.B ottom - 200)

    mfntPrint = New Font("Arial", 14)
    msngYPos = ev.MarginBounds .Top + _
    (2 * mfntPrint.GetHe ight(ev.Graphic s))

    recCurrent = New RectangleF(ev.M arginBounds.Lef t, _
    ev.MarginBounds .Top, _
    ev.MarginBounds .Right - 100, _
    msngYPos)

    sfCurrent.Align ment = StringAlignment .Center
    ev.Graphics.Dra wString("Deprec iation Schedule", _
    mfnrPrint, _
    Brushes.Black, _
    recCurrent, sfCurrent)

    mfntPrint = New Font("Arial", 10)

    msngFontHeight = mfntPrint.GetHe ight(ev.Graphic s)
    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, _
    "Depreciati on")

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

    End Sub
Working...