Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 22nd, 2003, 10:34 AM
vusubhahini vusubhahini is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 6 vusubhahini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question need help in VB6...plz reply ASAP

Hi,
I am new to VB6. I have a search button and i wrote code on Click event. now i want my search button to be activated when we press Enter in our Keyboard. So how can i assign two Events for one object?

Thanks

Reply With Quote
  #2  
Old December 22nd, 2003, 12:29 PM
rhafeez rhafeez is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Philadelphia, PA
Posts: 3 rhafeez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 11 m 25 sec
Reputation Power: 0
I believe you want to press Enter when you are on a TextBox or another control other than Search button.

Try the following code on the control from where you are going to press Enter:


Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
btnSearch_Click 'This is the search button Event
End If
End Sub


Let me know how it works out.

Reply With Quote
  #3  
Old December 22nd, 2003, 12:36 PM
vusubhahini vusubhahini is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 6 vusubhahini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks rhafeez... Its working.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > need help in VB6...plz reply ASAP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway