473,403 Members | 2,338 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,403 software developers and data experts.

Need vb text help

3
I need to declare the "DrawStringInBox" (in bold) but not sure how, 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
Oct 4 '07 #1
0 854

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
3
by: Mike | last post by:
Hey guys I am pulling my hair out on this problem!!!!! Any help or ideas or comments on how to make this work I would be grateful! I have been working on this for the past 4 days and nothing I do...
4
by: m.shidoshi | last post by:
I was recently put in charge of heading up my company's website, and while I have a lot of experience on the design side of things, I'm still very new to the programming side. When I started, the...
8
by: pamelafluente | last post by:
I am beginning aspNet, I know well win apps. Need a simple and schematic code example to start work. This is what I need to accomplish: ---------------------- Given button and a TextBox on a...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
8
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
0
by: alaa123 | last post by:
please i really need help to make a start I need to write an XSLT script that takes a file as its input and produces bargraph as its output the file (input) svg:svg...
1
by: jesper_lofgren | last post by:
Hello, i need to help here. I have a xmlnode as you can se below (full xml is in the bottom). I wonder how i can get the values inside the CSammanstallningLista . <CSammanstallning...
1
by: jesper_lofgren | last post by:
Hello, i need to help here. I have a xmlnode as you can se below (full xml is in the bottom). I wonder how i can get the values inside the CSammanstallningLista . <CSammanstallning Id="Omrade"...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.