Results 1 to 8 of 8

Thread: WebBrowser1 not working

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2022
    Posts
    2

    WebBrowser1 not working

    hi everyone
    if anyone is exert so kindly help me
    i am using WebBrowser1 and my website is not opeing

    i am using this code:

    Private Sub Form_Load()
    WebBrowser1.Silent = True

    WebBrowser1.Navigate "https://aiwa.ae/"
    End Sub

    i want to open that website in webbrowser "https://aiwa.ae/"
    so kindly solve me issue with easy code.

    see attchment screenshoot .Name:  1111.jpg
Views: 108
Size:  6.0 KB

  2. #2
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    8,526

    Re: WebBrowser1 not working

    Try some other website...your code is fine as far as I can see...I had issues try your website there.

    Sam
    Sam I am (as well as Confused at times).

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2022
    Posts
    2

    Re: WebBrowser1 not working

    hi sam
    thanks for reply .
    yeah i know my code is working but i want to open that website in browser. because i have a project for that.
    so kindly help me how can i open (https://aiwa.ae/) that website.
    thanks you so much

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    8,526

    Re: WebBrowser1 not working

    I can't assist...sorry.
    Sam I am (as well as Confused at times).

  5. #5
    Member
    Join Date
    Feb 2022
    Location
    Italy
    Posts
    50

    Re: WebBrowser1 not working

    Maybe some javascipt ES6 inside the website?
    Note that WebBrowser uses Internet Explorer and nowaday many website doesn't work with IE

  6. #6
    Junior Member
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    30

    Re: WebBrowser1 not working

    If you just want to open the URL in a browser window, then use ShellExecute: http://support.microsoft.com/kb/224816

    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
    
    Private Sub Command1_Click()
       Dim r As Long
       r = ShellExecute(0, "open", "http://www.microsoft.com", 0, 0, 1)
    End Sub
    This will open the URL in the default browser.

    Otherwise, if you need to display the webpage inside your app, use the WebBrowser control.

  7. #7
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,064

    Re: WebBrowser1 not working

    Quote Originally Posted by Attilio View Post
    Maybe some javascipt ES6 inside the website?
    Note that WebBrowser uses Internet Explorer and nowaday many website doesn't work with IE
    Not only that but the web browser control's engine defaults to something like IE7 ... to get it to something more modern, you have to update a registry setting.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8
    Frenzied Member
    Join Date
    Jun 2012
    Location
    Australia
    Posts
    1,112

    Re: WebBrowser1 not working

    Trying https://aiwe.ae straight into both Firefox and Edge window got no result.
    Last edited by el84; Dec 6th, 2022 at 05:02 PM.
    Thanks all!

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