|
-
Aug 17th, 2004, 04:16 AM
#1
Thread Starter
Hyperactive Member
Change the title
if any one wanted to know how to have a user make the title insted of programing a title into a vb application here's how to:
you need a text box and a button and this is the very simple code
Private Sub Command1_Click()
Form1.Caption = Text1
End Sub
one line of code and it is done.. but does anyone know how i can do this by pressing enter on the keyboard
i know how to change it as soon as a letter is typed in to the text box like this
Private Sub Text1_Change()
Form1.Caption = Text1
End Sub
but there must be a way of getting something to happen when i press enter on the keyboard.. please post a reply
If there is only one perfect person in the universe, does that make them imperfect?
-
Aug 17th, 2004, 10:44 AM
#2
Lively Member
Hi,
you could try it this way:
Code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Me.Caption = Text1
End Sub
But then it will make a cruel "pling"...
-
Aug 17th, 2004, 03:16 PM
#3
Thread Starter
Hyperactive Member
thanks it works now
later
If there is only one perfect person in the universe, does that make them imperfect?
-
Aug 19th, 2004, 08:39 PM
#4
Originally posted by rm_03
But then it will make a cruel "pling"...
To stop the "pling" or beep you could use :
VB Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
End If
End Sub
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Aug 19th, 2004, 08:51 PM
#5
Thread Starter
Hyperactive Member
If there is only one perfect person in the universe, does that make them imperfect?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|