Answer» Hello,
I am creating a web browser, I have most of the things done however I need help with the following: -When the user clicks on a link that opens a new window I want the new window to open in my browser not IE.
- When I click on a link to a page I would like the adress bar to show the current url(what is the variable for the current page ?)
- what is the variable for all the text in the web page ?
Thanks
Al968 All the text on web page might be:
objIE.document.body.Innertext
There is also an outertext property
The current page address can be found in:
objIE.LocationURL
Note: change objIE to the name of your browser object
8-)
Question: if you are writing your own browser would you not have to program all the properties and methods involved with a browser?Thanks for your RESPONCE,
Now what I was wondering is how to set the shortcut for a button to be the KEY "enter" (like in IE) so that the browser goes directly to the page when the user presses enter.
Thanks
Al968Are you creating your "own" own browser, or creating a program using VB's built in stuff to access the Internet? If so then you are basically taking a cut down version of IE ANYWAY, just putting your own stuff around it.Yes I now I am Using IE and putting my own stuff in Any Advice on the question ?? Thanks Al968Perhaps if we had an idea of what you're TRYING to do this would go a lot easier. Are you trying to program what a user might do, are you trying to scrape data from a web page, are you automating a task, say downloading?
This is some hefty reading with some invaluable information: HTML and DHTML Reference
Note: IE is scriptable, depending what you're doing, using VB.NET might be a bit overkill.
Good luck. 8-)The question I am asking doesn't specificly aplly to a browser. The question is : How can I set my program to run code when at any point the user presses the enter key ??
Thanks
Al968It must have been the post title that threw us off. We I get CONFUSED very easily.
Something like this should work:
Code: [Select]Private Sub txtSelection_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtSelection.KeyPress
If e.KeyChar = Chr(13) Then
'enter was pushed, click the submit button btnSubmit_Click(sender, e) End If End Sub
Note: Any key pressed while txtSelection has focus will run this code so you can trap any key you want to take action on.
Hope this helps. 8-)
|