[VB]Need Help, to code button please
Well I am using Microssoft Visual Basic 2008, and I want to code this function, when you clikc the button a link opens. Well with help of a friend I got a code but it still didn't work, no errors but the function didn't work.
Code:
Private Sub Button1_Click()
Dim IE
IE = CreateObject("InternetExplorer.Application")
IE.navigate("http://www.google.com/")
IE.Visible = True
End Sub
End Class
Thanks in advance :]
Re: [VB]Need Help, to code button please
So far i can remember of vb.net is that you just shell the webadress and it will open too.
Re: [VB]Need Help, to code button please
Isn't it like this that you need to display it on something? Form, panel whatever ? I do not know about VB, but VC# i guess in that case is similar. Creating an object does not solve the problem cause you need container for it. Trying setting like Parent = YourMainWindowForm or something like this.
Re: [VB]Need Help, to code button please
Doesn't VB .NET have the Process method? C# has it also..
PHP Code:
Process.open("IE.exe", "http://google.com");
Re: [VB]Need Help, to code button please
Emm ? So he didn't mean an embed in program web browser?
Re: [VB]Need Help, to code button please
Use this Code:
Code:
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
Call ie.Navigate("www.google.com")
Re: [VB]Need Help, to code button please
Try.
PHP Code:
Private Sub Button1_Click()
webbrowser1.navigate("www.roflomgwtfbbqomglol.com")
Enf Sub
Re: [VB]Need Help, to code button please
Quote:
Originally Posted by
danse
Emm ? So he didn't mean an embed in program web browser?
No, I just want the button to open google.com if its clicked on, just a simple button, and non of the methods worked :(
Re: [VB]Need Help, to code button please
Try:-
Code:
Private Sub Command Button1_Click()
Search(Explorer "http:///www.google.com")
End Sub
Is that don't work take the 'r' off the end of Explore
I haven't coded in a while, so my memory is alittle rusty, so it might be wrong :(:
Re: [VB]Need Help, to code button please
A fix to my snippet above:
PHP Code:
Process.Start("iexplore.exe", "http://google.com")
This works, and I've tested it. All you need is the program's application name. In this case, this would open up IE7; I think IE6 has IExplorer.exe, but I'm not completely sure.
Re: [VB]Need Help, to code button please
Quote:
Originally Posted by
Cask
A fix to my snippet above:
PHP Code:
Process.Start("iexplore.exe", "http://google.com")
This works, and I've tested it. All you need is the program's application name. In this case, this would open up IE7; I think IE6 has IExplorer.exe, but I'm not completely sure.
OMG THANKS A LOT,
I appreciate it, It actually worked!!
Re: [VB]Need Help, to code button please
Quote:
Originally Posted by
xelkin
OMG THANKS A LOT,
I appreciate it, It actually worked!!
No worries. But remember this wont open up the default browser, just Internet Explorer 7.
For example, if you wanted to open up another as the browser, you'd use the following:
PHP Code:
/* Google Chrome */
Process.Start("chrome.exe", "http://google.com");
/* Mozilla Firefox */
Process.Start("firefox.exe", "http://google.com");