open and close url (window) in vb net

Posted on 2009-02-12
Last Modified: 2012-05-06
Hi. Pretty new to VB Net, trying very hard, so please forgive my probably lightweight question.

In a VBNET program I have to open a URL. It's for executing a command (I am sending a SMS by opening the URL), so I would prefer it to be totally invisible.
The latter is probably impossible, but the alternative would be to minimize the window and to close the URL directly after opening it.

Meanwhile i learned that a url can be opened by :

Dim sURL As String = " etc "
Dim Page As Syst System.Diagnostics.Process.Start(sURL)

But this would make the page to be full sized and remain open.

Could you guys help me out?
Question by:dave_new_to_VBNET
    LVL 23

    Expert Comment

    You could try something like:
            Dim objWeb As Object
            objWeb = CreateObject("InternetExplorer.Application")
            Do While objWeb.Busy Or objWeb.readyState <> 4
            objWeb = Nothing

    Open in new window


    Accepted Solution

    Found it!!
    Dim startInfo As New ProcessStartInfo("IExplore.exe")
            startInfo.CreateNoWindow = True
            startInfo.WindowStyle = 1 'hidden
            startInfo.Arguments = ""

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now