| | |
Very Simple Code Not Working !
![]() |
•
•
Join Date: Jun 2008
Posts: 32
Reputation:
Solved Threads: 0
Hi I am new to VB but I was trying to just make a program so that if you press the letter A on your keyboard the text in a textbox is added to 1 (it starts at 0).... I'm using vb 2008 express edition.
I put a textbox (1) in my form but when i press run, the "cursor" is in the textbox so if i press A the thing changes to the letter a since my text cursor is in the box. Basically it doesnt work!!! HELP PLEASE!
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Class Form1 Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyCode = Keys.A Then TextBox1.Text = TextBox1.Text + 1 End If End Sub End Class
I put a textbox (1) in my form but when i press run, the "cursor" is in the textbox so if i press A the thing changes to the letter a since my text cursor is in the box. Basically it doesnt work!!! HELP PLEASE!
Move to vb.net forum. well.. try to look at here for the solution
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
![]() |
Similar Threads
- Help with what should be a very simple code task. (C++)
- simple c++ program (any help would be greatly appreciated) (C++)
- Uploading File Not Working...simple code, what's wrong? (PHP)
- Compiling Programs (C++)
- pointer/reference ? issues ... need help with simple code (C++)
- Getting a simple applet working! (Java)
- this code isn't working...why..plz help (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: please help me for my thesis?
- Next Thread: VB4 and Windows Vista
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





