DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: Help with VB problem

  1. #1
    Join Date
    Jan 2007
    Posts
    6

    Question Help with VB problem

    Hi, Thank you for looking at this post, but i am currently trying to create a button within VB6 that will open an Internet Explorer window and display the home page from the works admin control panel, using VB6 forms, but i have tried different things but nothing seems to work, please can someone help me with this, it would very much appriciate it.

    Cheers

    Shuka

  2. #2
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    well post what u have tried and we will help u correct it , and gives u new ideas .
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  3. #3
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    What is the URL of the page you want to open?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  4. #4
    Join Date
    Jan 2007
    Posts
    6

    Help with VB problem

    I'm currently trying using

    Private Sub Command1_Click()

    Command1.OpenURL("http://uk.yahoo.com")

    End Sub

    Have also tried using Shell = iexplorer

    If you can help it would be great.

  5. #5
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  6. #6
    Join Date
    Jan 2007
    Posts
    6
    Thank you for the example, so once the code is over, do you have to call the function from the button on the click commend?

    Cheers

    Shuka

  7. #7
    Join Date
    Jan 2007
    Location
    Ireland
    Posts
    2
    oops
    Last edited by Lobelia Overhil; 01-18-2007 at 02:37 PM. Reason: posted in the wrong place

  8. #8
    Join Date
    Jan 2007
    Posts
    6
    I have copy the code over but still unable to get it to work, please can anyone help at all

    Thanks in advanced

    Shuka

  9. #9
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    sometimes anti-spyware programmes (like ZONEALARM) pop-up an alert that mention that the program is trying to comunicate with IE.exe for example , accept or deny , if u choose deny the program will not be able to communicate with the IE, and if you do that at debug mode, the vb6 will be never able to open an internet explorer website .. untill u remove it from the blocked list for example ...
    this is firstly ,secondly check if u have choose the right place of your installed IE location ..
    Finally in phil's link, check that u have called the function with the right parameters;
    for example make a button, and in it's _onclick() event put this :

    OpenLocation "WWW.AMAHDY.COM", 3
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  10. #10
    Join Date
    Aug 2004
    Location
    Orange, California
    Posts
    1,263
    I tried the code that Phil posted the link to and it worked just fine. In fact I even made the paramaters optional and with default values. I have attached the little test program that I created. So try it out.
    Last edited by Ron Weller; 02-11-2009 at 08:00 PM.

  11. #11
    Join Date
    Jan 2007
    Posts
    22
    Try this code I think it will work with you

    Option Explicit
    Private Const SW_SHOW = 1

    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 Navigate(frm As Form, ByVal Document_Name As String)
    ShellExecute frm.hwnd, "Open", Document_Name, "", "", SW_SHOW
    End Sub

    Private Sub Command1_Click()
    Navigate Me, "http://www.devx.com"
    End Sub

Similar Threads

  1. hlp: I have a problem in VB 2005
    By ahsal in forum .NET
    Replies: 4
    Last Post: 12-20-2006, 07:21 PM
  2. Problem in sending E-Mail in VB 6.)
    By akshaya in forum VB Classic
    Replies: 0
    Last Post: 01-18-2006, 10:55 AM
  3. The day that everything went wrong!!!
    By WHYVB? in forum .NET
    Replies: 0
    Last Post: 10-03-2001, 09:14 AM
  4. Replies: 0
    Last Post: 04-20-2001, 09:53 AM
  5. Re: VB or Powerbuilder?
    By Jean-Yves in forum Enterprise
    Replies: 3
    Last Post: 06-01-2000, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center