|
|
|
|
![]() ![]() |
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: ![]() Now click the A button in the toolbox to the left: ![]() 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: ![]() 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: ![]() ![]() 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: ![]() 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: ![]() 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: ![]() Now click the play button in the toolbar: ![]() Now click the Test button: ![]() Clicking this button should print out Hello World! in the textbox. Now this was simple, well for an expert it is |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th September 2008 - 11:55 PM |