User Name
Remember Me?
Password
Home
Register
Calendar
Today's Posts
FAQ
Free Publications
Search
Xtreme Visual Basic Talk
>
Legacy Visual Basic (VB 4/5/6)
>
General
> How do I get the 'Enter' Key to work?
Thread Tools
Display Modes
#
1
04-20-2003, 03:17 AM
MrSimtang
Newcomer
Join Date: Apr 2003
Posts: 23
How do I get the 'Enter' Key to work?
For my program, I want my enter button to work once I type in text.
What's the code?
MrSimtang
View Public Profile
Find all posts by MrSimtang
#
2
04-20-2003, 03:23 AM
vbfan
Senior Contributor
Join Date: Dec 2002
Location: Saxony, Germany
Posts: 1,216
I hope that I had understand you right.
Code:
Private Sub Text1_KeyPress(keyAscii AS integer) IF KeyAscii = 13 then Command1_Click End IF End Sub
__________________
PhForms(Improved Msg- and Inputbox) v1.1!
PhControls:New PhCheckBox<-- check them OUT!
Flexible Alpha Image
vbfan
View Public Profile
Visit vbfan's homepage!
Find all posts by vbfan
#
3
04-20-2003, 04:11 AM
MrSimtang
Newcomer
Join Date: Apr 2003
Posts: 23
Ok thank you vbfan!!!
MrSimtang
View Public Profile
Find all posts by MrSimtang
#
4
04-20-2003, 04:21 AM
Squirm
Political Coder
Retired Moderator
* Guru *
Join Date: Mar 2001
Location: London, England
Posts: 8,037
If all you want to do is cause the
Enter
key to click a commandbutton, you can simply set the
Default
property of the commandbutton to
True
.
__________________
Search the forums
| Use [vb][/vb] tags |
Still IRCing
Squirm
View Public Profile
Find all posts by Squirm
#
5
04-20-2003, 04:22 AM
vbfan
Senior Contributor
Join Date: Dec 2002
Location: Saxony, Germany
Posts: 1,216
I had forgot to say, that you need to set the Keypreview to true of the Form
__________________
PhForms(Improved Msg- and Inputbox) v1.1!
PhControls:New PhCheckBox<-- check them OUT!
Flexible Alpha Image
vbfan
View Public Profile
Visit vbfan's homepage!
Find all posts by vbfan
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
Off
HTML code is
Off
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
Announcements
Announcements
Visual Basic .NET (2002/2003/2005/2008, including Express editions)
.NET Knowledge Base
Tutors' Corner
Code Library
ASP.Net
.NET Communications
.NET Game Programming
Managed DirectX
.NET Office Automation
.NET File I/O and Registry
.NET Database and Reporting
.NET Interface and Graphics
.NET Installation / Documentation
.NET General
Xtreme .NET Talk
Legacy Visual Basic (VB 4/5/6)
Knowledge Base
Tutors' Corner
Code Library
Communications
Game Programming
DirectX
VBA / Office Integration
Excel
Word, PowerPoint, Outlook, and Other Office Products
API
File I/O and Registry
Database and Reporting
Interface and Graphics
Installation / Documentation
General
Other Languages
Web Programming
Miscellaneous Languages
General Discussion
Tech Discussions
Random Thoughts
Forum Questions / Concerns / Comments
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
command button w/the enter key.
jlab13
General
9
04-20-2003
04:04 AM
Java and buged classes. Variables doesn't work with each other!
vbSIME
Miscellaneous Languages
2
03-11-2003
07:57 AM
Why does it work on my machine
nlarge
DirectX
3
12-10-2002
07:39 AM
My site for work experience. Does it work?
Kitaiko
Web Programming
22
06-14-2002
07:54 AM
Can't enter HEX numbers in value textbox?
vbfourme
General
8
12-10-2001
10:49 AM
Advertisement:
Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Home
Register
Calendar
Today's Posts
FAQ
Archive
© Xtremevbtalk.com 2001 - 2013. All Rights Reserved.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
-->