View previous topic :: View next topic |
Author |
Message |
FireShock Master Cheater
Reputation: 0
Joined: 14 Apr 2007 Posts: 324 Location: :niotacoL <- It's a mirror
|
Posted: Mon Mar 28, 2011 10:50 am Post subject: [VB6] How to put text in a textbox by clicking |
|
|
As the title says, I am looking for the piece of code to do the following.
In VB6, when a button is clicked, text should appear in a text box in the same form as the button.
I am not asking for you to write the entire piece of code, but just to help me along the way.
Also, since I am making sort of a text-based adventure game, the first problem I had was that i needed for the user to put his name in the textbox.
I would then use his name as a variable for later use.
What is the code for a user input ?
In my programming class on school we only use JustBasic so there it is just:
Code: |
INPUT "What is your name?" ; vName
|
But that doesn't work in vb.
Then a final question, how do I make a timer ?
Like when you display the rules of the game, after 10 seconds I want the rules to disappear and then a new line of text should come.
What is the code for making a timer like that sort ?
I have looked around on google and VB6 forums but no solution.
_________________
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon Mar 28, 2011 1:48 pm Post subject: |
|
|
Judging by your questions you sound like you are just starting to use VB6. I'm just going to go ahead and say it, VB6 is dead. It was dropped 6 years ago by Microsoft and has been discontinued due to the release of VB.NET
I highly recommend you stop VB6 before you even really start and move on to another language. If you want to stick with VB in general go with VB.NET. Most of the people on this forum that do more then just basics will suggest otherwise to use things like C/C++, C#, Java and so on instead so up to you.
_________________
- Retired. |
|
Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Mon Mar 28, 2011 2:20 pm Post subject: |
|
|
I recommend Java personally. I started off using VB6 like you, then taught myself C++, and am now taking a Java class at my school. I have yet to look back at C++, and Java has all that hip multiplatform capability
|
|
Back to top |
|
 |
M.CORP Grandmaster Cheater Supreme
Reputation: 28
Joined: 28 Oct 2009 Posts: 1010
|
Posted: Mon Mar 28, 2011 10:03 pm Post subject: |
|
|
Evil_Intentions wrote: | I recommend Java personally. I started off using VB6 like you, then taught myself C++, and am now taking a Java class at my school. I have yet to look back at C++, and Java has all that hip multiplatform capability  |
Same here dude, but no Java
Hey OP, for the user input try this:
Code: | Dim promptbox
promptbox = InputBox("propt here", "Title", "Default") |
_________________
|
|
Back to top |
|
 |
FireShock Master Cheater
Reputation: 0
Joined: 14 Apr 2007 Posts: 324 Location: :niotacoL <- It's a mirror
|
Posted: Tue Mar 29, 2011 9:24 am Post subject: |
|
|
Thanks !
I was actually looking for a usable programming language mainly for making funny things like games etc.
My teacher recommended VB6 but he has proven to be somewhat of an idiot sometimes.
I guess I will quit VB6 and read a lot of guides for C/C++ then.
_________________
|
|
Back to top |
|
 |
AhMunRa Grandmaster Cheater Supreme
Reputation: 27
Joined: 06 Aug 2010 Posts: 1117
|
Posted: Tue Mar 29, 2011 9:29 am Post subject: |
|
|
What language you chose is up to you, they all seem to be flavor of the month. Syntax varies from language to language, but concepts of programming usually carry over language to language. If you are doing it for games and such C++ or C is the way to go, if you want to build apps that are easily deployed without having to include tons of dll's with your build you could try .NET Visual C# or Visual C++ allow you to build apps very quickly. Both languages are well documented, and help is readily available. If you prefer to get into the guts of the computer C++ is the way to go.
_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.> |
|
Back to top |
|
 |
InternetIsSeriousBusiness Grandmaster Cheater Supreme
Reputation: 8
Joined: 12 Jul 2010 Posts: 1268
|
Posted: Tue Mar 29, 2011 7:21 pm Post subject: |
|
|
FireShock wrote: | Thanks !
I was actually looking for a usable programming language mainly for making funny things like games etc.
My teacher recommended VB6 but he has proven to be somewhat of an idiot sometimes.
I guess I will quit VB6 and read a lot of guides for C/C++ then. |
hmm... I can't see why any smart computer teacher, I assume that is what he is, would recommend a student visual basic 6. It is old, out-dated, unsupported by Microsoft, and the only free way to get it is by piracy.
|
|
Back to top |
|
 |
|