Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET General

Post new topic   Reply to topic
vb output
View previous topic :: View next topic  
Author Message
deepod
Newbie


Joined: 15 Jun 2005
Posts: 2

PostPosted: Jun 28th, 2005 05:28 AM    Post subject: vb output Reply with quote

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 Smile
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jmcilhinney
Freshman


Joined: 06 Jul 2005
Posts: 25
Location: Sydney, Australia

PostPosted: Jul 6th, 2005 03:57 AM    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic