2 Replies - 4327 Views - Last Post: 11 May 2011 - 02:17 PM Rate Topic: -----

#1 martydunn   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-April 11

'Default Web Browser ' over rule all other web browsers.

Posted 03 May 2011 - 09:10 PM

'Default Web Browser ' – over rule all other web browsers.

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.

The Web Browser name will be: Home Channel TV
The Website name will be: www.homechannel.tv


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

        '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), "")
        End If

    End Sub









@="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\""


@="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\""


@="C:\\PROGRA~1\\MHomeChannelTV.EXE -url \"%1\""


@="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\""


@="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\""


@="C:\\PROGRA~1\\HomeChannelTV.EXE -url \"%1\""

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]

This post has been edited by AdamSpeight2008: 03 May 2011 - 09:20 PM
Reason for edit:: Added in the missing code-blocks

Is This A Good Question/Topic? 0
  • +

Replies To: 'Default Web Browser ' over rule all other web browsers.

#2 modi123_1   User is online

  • Suitor #2
  • member icon

Reputation: 14094
  • View blog
  • Posts: 56,479
  • Joined: 12-June 08

Re: 'Default Web Browser ' over rule all other web browsers.

Posted 04 May 2011 - 07:03 AM

A few things off the top of my head - you are making a web browser for your website? As in anyone needing to view your site will require your web browser? That seems awfully narrow.

The 'default browser' is a tricky business. My guess, from the code that you pasted, is it checks something in the registry. With the level of skill you say you are that might be a very hard thing to do. Plus mucking around in the registry is *not* something you want to take lightly.

What have you found so far in regards to the 'default browser'? Areas you searched so we are not covering the same ground?

I need help with the code, and where I should paste it. I am new to Visual Basic.

What do you mean? You want us to code it for you? That's not what DIC is about. We will help, but we don't hand out code.

I am going to guess that isn't your code. Where have you tried putting that in your project?
Was This Post Helpful? 0
  • +
  • -

#3 BobRodes   User is offline

  • Lovable Curmudgeon
  • member icon

Reputation: 600
  • View blog
  • Posts: 3,071
  • Joined: 19-May 09

Re: 'Default Web Browser ' over rule all other web browsers.

Posted 11 May 2011 - 02:17 PM

Additionally, are you trying to tell me that if I download your program onto MY computer, you'd like to know how to make it the default browser, so you can like spam me with ads and that sort of thing? I don't think so.

Default browser is a value in the registry. If you're asking me how to bypass the security on a user's registry, you might as well ask me how to format a user's disk when he downloads your program onto his computer.

You might want to rephrase your question, because right now you're sounding like you want to know how to hijack a computer.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1