 |
| View previous topic :: View next topic |
| Author |
Message |
deepod Newbie
Joined: 15 Jun 2005 Posts: 2
|
Posted: Jun 28th, 2005 05:28 AM Post subject: vb output |
|
|
i have a small .net program that is a form with some buttons. The output of the bottons are text displayed on msg boxes. However i want the text to be output on the same form, perhaps on another panel or something. I'm new to vb .net and would appreciate any help and suggestions on how i can display my results on the same form. What about sending the info to a file too, like word doc or something. Is a print function also available for forms?
Thanks for any help
Dave  |
|
| Back to top |
|
jmcilhinney Freshman
Joined: 06 Jul 2005 Posts: 25 Location: Sydney, Australia
|
Posted: Jul 6th, 2005 03:57 AM Post subject: |
|
|
You can do all of that, but one thing at a time. If you want to display some information on your form, you can use a variety of controls to do so. The most likely would be a Label or a TextBox. The TextBox has a ReadOnly property that you can set to True so that the user cannot edit the text it contains. Like most controls, the Label and TextBox both have a Text property that corresponds to the text that they display. Assuming that you have a Label named Label1 on your form, to have it display the string "Hello World" you would use this code: | Code: | | Me.Label1.Text = "Hello World" | The Text property is just a String, so you can manipulate it like you would any String object.
Edit:
For file IO you use the classes in the System.IO namespace. For printing you use the classes in the System.Drawing.Printing namespace. You can also control a running instance of Microsoft Word directly using automation. These are all complex topics, though. Do some reading and post back again when you have more specific questions. |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|