Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

send a TAB or a ENTER character to webbrowser with VB

Posted on 2009-04-21
4
Medium Priority
?
1,159 Views
Last Modified: 2012-05-06
What is the VB code to send a character to the WebBrowser control?

I can send a string to a field using:

WebBrowser1.Document.All("pin").SetAttribute("value", "dogface")

The above works okay.  But would like to send something like {ENTER} or {TAB} to the browser.   Like a key stroke.

Thanks,
Keith
0
Comment
Question by:keithblack
  • 2
4 Comments
 
LVL 6

Expert Comment

by:zwseemm
ID: 24200572
I beleive chr(13) is an enter.
http://www.danshort.com/ASCIImap/
0
 
LVL 1

Author Comment

by:keithblack
ID: 24200625
Sorry, what I am asking is what is the command to send a single character to the web page.

Thanks,
Keith
0
 
LVL 15

Accepted Solution

by:
oobayly earned 500 total points
ID: 24203247
Focus on the Control & then use the SendKeys.Send method
WebBrowser1.Focus()
SendKeys.Send(vbCrLf) // New Line
SendKeys.Send(vbTab)  // Tab

Open in new window

0
 
LVL 1

Author Closing Comment

by:keithblack
ID: 31573033
Thanks, exactly what I was looking for.  Used the commands before, but forgot what I had used!!!!  

Again,
Thanks
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question