xy class for screen output

ideprize

Well-known member
Joined
Oct 19, 2011
Messages
97
Programming Experience
10+
Hi to all

I have a vb.net program that continuously cycles processing documents (that are members of a FoxPro table) for printing, faxing and email. I need to report the status of these functions, which includes identification, to the Windows Form that loads and starts this cycling process. I need a class with a lot more control than console.write/writeline, for this output needs both vertical and horizontal placement, i.e. rows and columns. The tools that I have encountered do not have this kind of control, i.e. console.write or textwriter.write. Is there a class that will provide this kind of functionality? Any insight would be greatly appreciated - this is the last task that I need to implement in order to finalize this program. Thanks in advance.

Respectfully,
Ideprize
 
Wow thanks Jim for the quick response.
I guess I could - a multi-line? The "report" will be 6 columns by 25 rows (more or less). I can see where you are heading I think. The TextBox would at least create the "origin" point and then I guess I could use spaces and tabs for the column placement. What about rows. Will the TextBox handle newline format?
Respectfully,
Ideprize
 
What about rows. Will the TextBox handle newline format?

Yep. Just use Environment.NewLine to get a line break to add to the text. If you're adding all the text in one go then you can use the Lines property to have the control add the line breaks itself, e.g.
myTextBox.Lines = {firstLine, secondLine, thirdLine}
You can also append one line at a time, e.g.
myTextBox.AppendText(firstLine & Environment.NewLine)
myTextBox.AppendText(secondLine& Environment.NewLine)
myTextBox.AppendText(thirdLine& Environment.NewLine)
 
Hi again Jim
Yes I did it a little different but the textbox got me "out of Dodge". I built the lines integrating them with the proper spacing between each column and ended each line with vbCrLf. It is working and I thank you again Jim - the key indeed was the textbox. For the sake of augmenting my tool bag is there a class that handles coordinates in "x:y space" on a winform? I imagine that there would have to be some kind of a control that would create space (like the textbox) in the form for that seems to be basic nature of the beast. But it sure would be nice to be able to coordinatize that space once it was created. Being a math type that's what I always want to do - get a mapping!
Respectfully,
Ideprize
 
Hi again Jim
Yes I did it a little different but the textbox got me "out of Dodge". I built the lines integrating them with the proper spacing between each column and ended each line with vbCrLf. It is working and I thank you again Jim - the key indeed was the textbox. For the sake of augmenting my tool bag is there a class that handles coordinates in "x:y space" on a winform? I imagine that there would have to be some kind of a control that would create space (like the textbox) in the form for that seems to be basic nature of the beast. But it sure would be nice to be able to coordinatize that space once it was created. Being a math type that's what I always want to do - get a mapping!
Respectfully,
Ideprize

There's no text-based control that will do that for you, at least not in the Framework itself. What you would have to do is draw the text on a control - probably a PictureBox as it's optimised for the purpose - using GDI+. You can then specify the exact location to draw each string.
 
Yes I did look at the picturebox but I got the impression that it would only accommodate images. No problem I now understand the winform model better and the textbox will surely "do the job". Again, Jim, thanks for your expertise.
Respectfully,
Ideprize
 
Back
Top