Hi Everyone.
I have created a 'web browser' using VB6.
I am trying to make it the ‘Default Web Browser’, programmed powerfully enough, to over rule all other web browsers, such as Internet Explorer, Fire Fox, Google Chrome, Opera, Flock, Safari, etc. Once it is downloaded onto any computer. (That means also, if the public have access to this Web Browser, and download it onto their computer.)
I simply do not have the knowledge to complete it. In making this web browser, the “Default Web Browser” for all computers.
The main reason I have created this Web Browser, is for it to be suited to my new Web Site I’m launching soon.
My code is below. Can anybody help me complete it, to reach my goal? Please.
I need help with the code, and where I should paste it. I am new to Visual Basic.
Thank you very much.
Marty.
The Web Browser name will be: Home Channel TV
The Website name will be: www.homechannel.tv
CODE
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
'PURPOSE: Opens default browser to display URL
'RETURNS: module handle to executed application or
'Error Code ( < 32) if there is an error
'Use one of the constants in the declarations as
'the window state parameter
'can also be used to open any document associated with
'an application on the system (e.g., passing the name
'of a file with a .doc extension will open that file in Word)
Private Function OpenLocation(ByVal URL As String, _
ByVal WindowState As Long) As Long
Dim lHWnd As Long
Dim lAns As Long
lAns = ShellExecute(lHWnd, "open", URL, vbNullString, _
vbNullString, WindowState)
OpenLocation = lAns
'ALTERNATIVE: if not interested in module handle or error
'code change return value to boolean; then the above line
'becomes:
'OpenLocation = (lAns > 32)
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim File As String = Command()
If Not File = "" Then
File = Replace(File, Chr(34), "")
WebBrowser1.Navigate(File)
Else
WebBrowser1.Navigate("htt:://>/www.homechannel.tv")
End If
End Sub
My.Computer.Registry HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.shtml] @="HomeChannelTVHTML" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xht] @="HomeChannelTVHTML" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xhtm] @="HomeChannelTVHTML [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xhtml] @="HomeChannelTVHTML" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.htm] @="HomeChannelTVHTML" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.html] @="HomeChannelTVHTML" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\DefaultIcon] @="C:\\PROGRA~1\\HomeChannelTV.EXE,1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\FirefoxHTML\shell\open\command] @="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ftp\DefaultIcon] @="C:\\PROGRA~1\\HomeChannelTV.EXE,1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ftp\shell\open\command] @="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\gopher\DefaultIcon] @="C:\\PROGRA~1\\HomeChannelTV.EXE,1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\gopher\shell\open\command] @="C:\\PROGRA~1\\MHomeChannelTV.EXE -url \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\DefaultIcon] @="C:\\PROGRA~1\\HomeChannelTV.EXE,1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\shell\open\command] @="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\DefaultIcon] @="C:\\PROGRA~1\\HomeChannelTV.EXE,1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command] @="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CHROME\DefaultIcon] @="C:\\PROGRA~1\\HomeChannelTV.EXE,1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CHROME\shell\open\command] @="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\"" [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main] "Check_Associations"="No" "IgnoreDefCheck"="Yes"
This post has been edited by AdamSpeight2008: 03 May 2011 - 09:20 PM
Reason for edit:: Added in the missing code-blocks

New Topic/Question
Reply



MultiQuote







|