![]() |
|
[vb6] Get Default Browser - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework) +--- Thread: [vb6] Get Default Browser (/Thread-vb6-Get-Default-Browser) |
[vb6] Get Default Browser - sylar - 08-24-2012 written by starz Code: Option Explicit
Public Function sDBrowserPath() As String
Dim oShell As Object
Set oShell = CreateObject("WScript.shell")
sDBrowserPath = Split(oShell.RegRead("HKEY_CLASSES_ROOT\HTTP\shell\open\command\"), Chr(34))(1)
End Function
Private Sub main()
MsgBox sDBrowserPath
End SubRE: [vb6] Get Default Browser - H4R0015K - 08-24-2012 (08-24-2012, 05:37 PM)sylar Wrote: written by starz what does this code do? RE: [vb6] Get Default Browser - sylar - 08-24-2012 It returns the default browser path. make a new vb6 project with only one modul, paste this code into it and run. then u will see what i meand RE: [vb6] Get Default Browser - ::nplz_boy:: - 10-16-2012 just make ur code Shell ("Explorer.exe http://bisauninepal.blogspot.com") it turn on our default browser . RE: [vb6] Get Default Browser - kabalevsky - 11-09-2012 I usually use Process.Start() for something like this. Add a filename for its argument and it will do whatever your system does by default with that type of file. Process.Start("something.txt") will open it up in notepad Process.Start("http://google.com") will open your browser to google Your code seems a little bit too complicated, sylar. |