Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Getting Started In Vb 6, Printing out Hello World! in a text box.
MarCrush
post Jun 4 2005, 02:46 AM
Post #1


Super Member
*********

Group: Members
Posts: 203
Joined: 2-June 05
From: Why would you want to know?
Member No.: 7,778



Sorry for a duplicate post in Programming::VB Programming, I accidentally submitted this topic when I wasn't done.

This example prints out Hello World!

First launch VB 6. Second on the dialog that pops up create a New Standard Project and click Open.

You should see this so far:
user posted image

Now click the A button in the toolbox to the left:
user posted image

Click the drag the object.

Now click AB| next to the A in the toolbox. Drag it under Label1. Then click the button under the AB| and drag it under Text1.

It should now look like this:
user posted image

Now that we have done adding objects to the forum we shall now change the properties of the objects.

Click on Label1 and on the right is the properties window, click on Label1 next to (Name). Scroll down and type lblExample and next to caption type "Text will appear here you click test." without the quotation marks:
user posted imageuser posted image

Now click on Text1 and next to (Name) type txtExample and make the Text field (not caption) blank. The Text field is at the bottom.

Now click on Command1 and next to (Name) type cmdExample and make the Caption field "Test" with the quotation marks.

Now this is what it should look like now:
user posted image

Now we are done adding objects to the forum, we are now ready to add the code to make this work. Double Click on Test. It should bring up this:
user posted image

Now in between Private Sub cmdExample_Click() and End Sub type:
CODE
txtExample.Text = "Hello World!"

You may change the "Hello World!" part to anything you like "Hello"

It should now look like this:
user posted image

Now click the play button in the toolbar:
user posted image

Now click the Test button:
user posted image

Clicking this button should print out Hello World! in the textbox. Now this was simple, well for an expert it is smile.gif .
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. What Program Do You Use To Design Your Web?(93)
  2. My Experience With World Of Warcraft.(3)
  3. Text Size In "fill-in" Form Blanks(2)
  4. Text Visualizer(1)
  5. Nostradamus And World War Iii Predictions(0)
  6. The Next World Super Power?(37)
  7. Ad Text(2)
  8. Superpower India & China -arrival Of Bipolar World(4)
  9. Who Is The Hottest Girl In The World?(178)
  10. Pc Garage World(0)
  11. Play World Of Warcraft, Wrath Of The Lich King Now(16)
  12. Getting Started With Amfphp And Rias(2)
  13. A World Without A Religion?(286)
  14. Open Program Copyrights For Third World Nations(7)
  15. An Ode To Gmail.(5)
  1. World Of Warcraft(29)
  2. Problem Getting Text To Align With Different Resolutions(4)
  3. June 6th 2006 - The Devils Number(112)
  4. Is There Something Else Than Our Material World?(10)
  5. World Of Warcraft And Vista With Choppy Frame Rates(2)
  6. World Of Warcraft: Bc Cinematic(2)
  7. Text Editors Vs Word Processors(6)
  8. Using Unknown Fonts For Text In Webpage(5)
  9. Just Started Cpc Advertising... Any Suggestions?(0)
  10. New Text Based Tactic Online Game(0)
  11. World Of Warcraft Addiction(10)
  12. The G8 Summit And The True Problems Of The World!(6)
  13. China To Attack Usa(6)
  14. Buying World Of Warcraft Gold?(1)
  15. World Of Warcraft?(5)


 



- Lo-Fi Version Time is now: 5th September 2008 - 11:55 PM