Page 3 of 3 FirstFirst 123
Results 81 to 108 of 108

Thread: vb web browser tutorial

  1. #81
    New Member
    Join Date
    Mar 2010
    Posts
    3

    Re: vb web browser tutorial

    Hi,

    I am trying to use the WebControl in VB6 as an activeX which I put in a cab file and then display in a html page.

    Only problem is that I am not able to get to the URL of the current page :
    locationURL does not work and documentCompleted does not run as I describe in http://www.vbforums.com/showthread.p...54#post3748554

    Can somebody help me with this.

    Thanks !

  2. #82
    Member smith carlos's Avatar
    Join Date
    Nov 2009
    Posts
    39

    Re: vb web browser tutorial

    Quote Originally Posted by joebobfrank View Post
    Code:
    Private Sub WebBrowser1_TitleChange(ByVal Text As String)
        Form1.Caption = WebBrowser1.LocationName
    End Sub
    Show page title in the forms caption.

    can i have it for vb.net !! 2008

  3. #83

  4. #84
    New Member
    Join Date
    Mar 2010
    Posts
    3

    Re: vb web browser tutorial

    Hi Gary,

    Thanks for the reply !

    The problem here is I am using vb 6 and I am running an activeX in IE. When I use the activeX I created in a vb 6 desktop client all works well. But in the browser it does not.

    I do not think the link you send me does answer this or did I miss something?

  5. #85
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: vb web browser tutorial

    Ronny,

    I was replying to the question from smith carlos regarding a .Net version, which is shown in the link that I posted.

    Sorry, I have no idea about your question, I don't do VB 6

    Gary

  6. #86
    New Member
    Join Date
    Mar 2010
    Posts
    8

    Re: vb web browser tutorial

    Dear Sir,
    Today only i visited this forum and found it very useful.

    I know programming in VB6, and currently facing a problem.
    The problem is that i want to open the link on my webbrowser control in in a new window.
    If i am using the right click > open in new window then i am able to catch it via..

    Code:
    Private Sub wb_NewWindow2(index As Integer, ppDisp As Object, Cancel As Boolean)
      ........
      .........
      frmMain.wb(new_index).RegisterAsBrowser = True
      Set ppDisp = frmMain.wb(new_index).Object
    End Sub
    But what i want is even if somebody click the left mouse button on a link, i shall be able to open it in a new window (with session maintained).

    Second thing is that i want to scroll the loaded page programatically (pagedown/pageup).

    Is it possible to do the above two actions?

  7. #87
    Member ts96's Avatar
    Join Date
    Mar 2010
    Posts
    37

    Re: vb web browser tutorial

    I can only give you a solution for your first question. Just use the following code:
    Code:
    Option Explicit
    Enum BrowserNavConstants
        navOpenInNewWindow = 1
        navNoHistory = 2
        navNoReadFromCache = 4
        navNoWriteToCache = 8
        navAllowAutosearch = 16
        navBrowserBar = 32
        navHyperlink = 64
        navEnforceRestricted = 128
        navNewWindowsManaged = 256
        navUntrustedForDownload = 512
        navTrustedForActiveX = 1024
        navOpenInNewTab = 2048
        navOpenInBackgroundTab = 4096
        navKeepWordWheelText = 8192
        navVirtualTab = 16384
        navBlockRedirectsXDomain = 32768
        navOpenNewForegroundTab = 65536
    End Enum
    so you can now navigate to a site (e.g. google.com) by using:
    WebBrowser1.navigate "www.google.com", 1
    I can't give you an answer for your second question.

  8. #88
    New Member
    Join Date
    Apr 2010
    Posts
    2

    Question Re: vb web browser tutorial

    Does anybody know where I can find either an opera browser control, a google chrome control, a good non-glitchy firefox control, or just adding security to the standard IE control? i have a firefox control already but it is probably the worst thing i have ever had to deal with so i think i need a different thing. oh and also a bookmarks thing. that would be great.

  9. #89
    New Member
    Join Date
    Apr 2010
    Posts
    1

    Re: vb web browser tutorial

    Quote Originally Posted by zeidhaddadin View Post
    * Show webpage's source code:
    VB Code:
    1. Private Sub Form_Load()
    2. Text1.Text = Form1.browser.Document.documentElement.innerHTML
    3. End Sub

    Hi!

    I would like to ask for a little help with this feature. It works great, but doesnt do everything what i really need. I want monitor every page's source code. But this code monitors only the page, what you typed in Combo1. After i click on the loaded page navigate to an other --> the source -Form1.browser.Document.documentElement.innerHTML- doesnt change. If i type other adress, it creates a new innerHTML. Hope, i could wrote my problem well..

    So my question is: how can i monitor every page's source code

    Thank you in advance

  10. #90
    New Member
    Join Date
    Apr 2010
    Posts
    2

    Re: vb web browser tutorial

    is there a code to load a saved page? if someone could post it, that'd be great.

  11. #91
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: vb web browser tutorial

    You should ask your questions in the main forum. I think you will get better responces there.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  12. #92
    Member
    Join Date
    Jun 2010
    Location
    Nepal | Beni bazar myagdi,kalipul
    Posts
    39

    Re: vb web browser tutorial

    Thnks you your oppertunity this is my first question reply you code gose here
    Code:
    If KeyAscii = vbKeyReturn Then
      Command1_Click
    End If

  13. #93
    Member
    Join Date
    Jun 2010
    Location
    Nepal | Beni bazar myagdi,kalipul
    Posts
    39

    Re: vb web browser tutorial - Search function

    i'm sorry but will it be applied for the case of other search engines.How?

  14. #94
    New Member
    Join Date
    Aug 2010
    Posts
    1

    Re: vb web browser tutorial

    MSWindowsUser, I don't really need the attachment as mine came with it and i run 6.0 However, Nelton, I have made a Web Browser, Not with the timer or notes, but it does have searchbox..I have another with a history box. though i dont no why, but to add stuff to it, you need to highlight it all blue, and press backspace (erase key) for it to add... If anyone can give me code so it automaticly adds, then thanks!

  15. #95
    Member
    Join Date
    Jun 2010
    Location
    Nepal | Beni bazar myagdi,kalipul
    Posts
    39

    Re: vb web browser tutorial

    Thanks all the friends of vbforums

  16. #96
    New Member
    Join Date
    Apr 2010
    Posts
    7

    Re: vb web browser tutorial

    Hi All... i've nearly finished building a web browser using visual studio 2005, but i'm just having trouble displaying the url of the current page displayed in the web browser control!

    i.e
    urltxtbox1.text = WebBrowser1. ?????


    Can anyone please help me....
    Thanking you in advance...

  17. #97
    Member MSWindowsUser's Avatar
    Join Date
    Dec 2007
    Posts
    40

    Re: vb web browser tutorial

    Quote Originally Posted by chukka32 View Post
    Hi All... i've nearly finished building a web browser using visual studio 2005, but i'm just having trouble displaying the url of the current page displayed in the web browser control!

    i.e
    urltxtbox1.text = WebBrowser1. ?????


    Can anyone please help me....
    Thanking you in advance...
    Hello. Are you talking about when displaying the title of the site e.g. www.google.com - Google (title bar)? or the StatusBar e.g. Loading www.google.com/ladidadid Done?

  18. #98
    New Member
    Join Date
    Apr 2010
    Posts
    7

    Re: vb web browser tutorial

    Hi MSWindowsUser,
    What I'm trying to do is to keep the current page URL displayed in a separate textbox, so that when I browse back and fro with the navigate buttons then the textbox changes with the webbrowser control if that makes any sense?! I basically need the code to read the URL for the current page that is displayed in the web browser?!?!
    Thanks for your prompt response!!

  19. #99
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: vb web browser tutorial

    Quote Originally Posted by chukka32 View Post
    Hi All... i've nearly finished building a web browser using visual studio 2005, but i'm just having trouble displaying the url of the current page displayed in the web browser control!

    i.e
    urltxtbox1.text = WebBrowser1. ?????


    Can anyone please help me....
    Thanking you in advance...
    Hey,

    If you are creating a Web Browser in Visual Studio 2005, why are you posting/asking questions about it in the VB6 forum?!?

    Take a look at the links in my signature, they will be of more help to you if you are using .Net.

    Gary

  20. #100
    New Member
    Join Date
    Jan 2011
    Posts
    1

    Re: vb web browser tutorial

    this agood tutorial and it's agood work
    but, in my project i need to using search engine such as google or yahoo to search about any subject and then i need to store only html and pdf documents to hard disk , can any one known me how do that programatically, please answer me?

  21. #101
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: vb web browser tutorial

    Hello, how to you loop through all elements (input, select textarea etc) of a form and fill them?
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  22. #102
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: vb web browser tutorial

    See post #91


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  23. #103
    New Member
    Join Date
    Aug 2011
    Location
    Vietnam
    Posts
    2

    Re: vb web browser tutorial

    Hi, I'm new here. I know how to make a web browser in VB 2010 but I don't know how to let it access IP address like 192.168.1.1 or else. Please help me...

  24. #104
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: vb web browser tutorial

    Quote Originally Posted by silveraero View Post
    Hi, I'm new here. I know how to make a web browser in VB 2010 but I don't know how to let it access IP address like 192.168.1.1 or else. Please help me...
    Hello silveraero,

    Welcome to the forums!

    Can you please provide more information about what you are trying to achieve? Are you saying that you want to restrict access to a site based on the client IP address, or are you saying that you want your web browser to be able to access a website that is hosted on 192.168.1.1. If it is the latter, then it should simply be a case of navigating to http://192.168.1.1.

    Gary

  25. #105
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: vb web browser tutorial

    Quote Originally Posted by silveraero View Post
    Hi, I'm new here. I know how to make a web browser in VB 2010 but I don't know how to let it access IP address like 192.168.1.1 or else. Please help me...
    See post #91


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  26. #106
    New Member
    Join Date
    Aug 2011
    Location
    Vietnam
    Posts
    2

    Re: vb web browser tutorial

    Sorry, it's double post. Thank you very much. Solved it.

    I'm design a web base application. Here is the description: I have an Android phone and I installed a wifi transfer application. I build this application as an file transfer center, you know, like PC suite or sync ... (my country is not using English as main language so sorry for my bad English).

    What I want to as is how can I list the phone that using the wifi transfer application so I just need to choose in the list to transfer?
    And, when I resize the form, the right align control will not realign to the border and stay still. Here is my solution for this:
    [qupte]Private Sub Main_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
    cbPort.Top = 15
    cbIP.Top = 15
    cmdBack.Top = 10
    cmdForward.Top = 10
    cmdHome.Top = 10
    cmdStop.Top = 10
    cmdGo.Top = 10
    cmdStop.Left = Me.Width - cmdStop.Width - 40
    cmdGo.Left = Me.Width - (cmdStop.Width) * 2 - 45
    cbPort.Left = Me.Width - (cmdStop.Width) * 2 - 50 - cbPort.Width
    cbIP.Width = Me.Width - (cmdBack.Width) * 5 - cbPort.Width - 90
    End Sub
    [/quote]
    I just think about the controls size and scale. Does anyone have better solution?

  27. #107
    New Member
    Join Date
    Jan 2014
    Posts
    1

    Re: vb web browser tutorial

    Name:  geggeg.PNG
Views: 2046
Size:  27.8 KB

    this is the browser I created you can download the sample if you want
    here - < link removed by moderator >
    Last edited by si_the_geek; Jan 6th, 2014 at 10:57 AM. Reason: removed link to executable

  28. #108
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: vb web browser tutorial

    Quote Originally Posted by virmil15 View Post
    this is the browser I created you can download the sample if you want
    Welcome to VBForums

    I have removed your link to protect our members, because we have no way of knowing what an executable file actually does - which could include something malicious, such as if there is a virus on your computer.

    Feel free to post the code in an attachment (without executable files). You can do that by putting the files into a zip file, and when posting click on the "Go advanced", then "Manage attachments"

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width