I'm trying to create a web browser window for an application I'm making... How do I get a button to refresh the content in the web browser? Thanks in advance, Fexxel
Double click your refresh button, and put this in: Code (Text): on error goto err: If tabstrip1.selecteditem.index = 1 then 'webbrowser 1 selected wbmain.refresh elseif tabstrip1.selecteditem.index = 2 then 'wb 2 selected wbmain2.refresh End If err: Assuming your elements are named as follows, and you are creating a tabbed web-browser: Naming conventions: WebBrowsers - wbmain, wbmain2 TabStrips - tabstrip1 cmdrefresh
Sorry will but that's not really what I'm talking about... 1. I'm not doing a tab browser... xD? 2. I don't want it to do something on error. I'm not making an "if/then" statement. I'm issueing a single command and a repeat. The single command is to refresh and the repeat is. Well. However to repeat the command. Are you saying its WebBrowswer1.refresh ? In that case, could I do WebBrowser1.Refresh(10) to refresh 10 times?
Oh, I overcomplicated things :/ Sorry.. I have a tendency for doing that I think this is what you want: Code (Text): Private Sub cmdrefresh_Click() WebBrowser1.Refresh End Sub That's as simple as it comes for a refresh button :/
Fexxel, I have the feeling you didn't even try reading one of the many vb.net tutorials... You won't learn anything this way, believe me. Google is your friend. Hint: There's something called "For... Next"... google it.
ricky, you are 100% correct Google is your friend what i do is i look and look and look, and if i still can't find what i'm looking for on google after 20-30 minutes of looking, then i turn for help Google has helped me sooo many times when i'm programming though simply, if you had googled it, especially something this big, you would of gotten tons of results, as its just a simple command...
ya you can google almost anything for programming, except for wrappers and that kind of stuff... if you want to see all the list of commands your webbrowser can do just type webbrowser. into your form, and it will suggest like 10 things you can do (refresh/navigate/goback/goforward, ect..)