Teen Programmers Unite  
 

 

Return to forum top

Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Posted by andymcnab [send private reply] at March 29, 2002, 02:05:12 PM

Hello, i have a very simple problem with VB6:

I have made a console for my app consisting of 2 text boxes and i want it so if you press enter after typing something in one of the text boxes then it will show some text in the other and maybee run a program or do something. pls help it is just a simple keypress or key down statement, ive looked in the help and i couldnt sort it!!
thnx, help appreciated

Posted by manoj [send private reply] at March 29, 2002, 02:17:48 PM

R U asking how 2 type abc.text="sdk" in the keypress event?
I really couldn't get ur question. If its anything different plz elaborate. Also, msdn lib is quite full with all sort of examples 2 do these simple things.

Posted by andymcnab [send private reply] at March 29, 2002, 02:34:35 PM

Yes i am, thanx if you would tell me, appreciated

Posted by manoj [send private reply] at March 29, 2002, 02:42:58 PM

Well friend I thought my above answer was sufficient. Still, if u know nothing about it, try pressing the button at the form window or just look in the menu items to get the general format of a keypress event. Once u get the method, just type the above in it (and use appropriate name 4 the textbox). U'll get dozens of examples in any tutorial.

Posted by andymcnab [send private reply] at March 29, 2002, 03:20:04 PM

ok thanks a lot, respect, andy mcnab

Posted by metamorphic [send private reply] at March 30, 2002, 06:28:56 AM

if you want to run a program from vb using a texbox, get the user to input the program nam they want to run in the text box and when they click a button call the 'SHELL' function. for eg, this would display an input box and then run the app that was typed in:

strAppName = InputBox("To run the calculator type 'calc'. " & "to run Notepad type 'notepad'.", "Enter Shell Command")

Shell strAppName, vbNormalFocus

Hope this helps

Marc

Posted by andymcnab [send private reply] at March 30, 2002, 03:20:20 PM

Yeah, metamorphic it helps a lot thanx a lot,

AndyMcnab

Posted by diegoeskryptic [send private reply] at April 01, 2002, 07:26:12 PM

ok.... who can give me sum tips on how to make alot of money in Dopewars!!!

Posted by gian [send private reply] at April 01, 2002, 10:05:54 PM

Ummm....
1) How is this a programming question
2) If you read the help you would find that you can set your initial funds.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.