|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Could anyone tell me how to use SendKey under VB6 for a "RIGHT" arrow key and a "RETURN/ENTER"?Any references I have to add?
Thanks! |
|
#2
|
|||
|
|||
|
http://msdn.microsoft.com/library/e...stmSendKeys.asp
F1 in VB should have found this for you.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
It does help! For curiosity I have quoted the following code -
Private Sub Form_Load() Dim answer Dim WshSell answer = MsgBox("Please choose", 3 + 16, "Answer me") MsgBox "Before auto answer is" & answer 'This should show 6 SendKeys "{LEFT}" SendKeys "{LEFT}" SendKeys "~" If answer = 2 Then MsgBox "CANCEL" If answer = 6 Then MsgBox "YES" If answer = 7 Then MsgBox "NO" MsgBox "After auto answer is" & answer "This should show 2 End Sub The purpose is to choose "Cancel" which is on the far right side by going "Right" and "Right". But only to close the pop-up window. Is that a way that I could close the display window, therefore the action is automatic (let's say after 5 seconds) if there is NO response from the user. I want an answer NOT using VBYes, VBCancel....... Thanks. |
|
#4
|
|||
|
|||
|
You could use a timer control set to 5 seconds and use sendkeys in the timer event procedure.
|
|
#5
|
|||
|
|||
|
Could I close the MsgBox automatically through VB6 after a certain (5 seconds) time by coding?
Thanks. |
|
#6
|
|||
|
|||
|
I don't know if you can close a VB msgbox, but if you make your own custom msgbox form you can certainly close that from code.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > SendKey under VB6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|