DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: An unhandled exception of type 'System.InvalidOperationException' occurred in system.

  1. #1
    Join Date
    Dec 2005
    Posts
    4

    Exclamation Passing info to website not working/waiting for it to be loaded

    Hello,
    I was hoping there might be someone out there that could help me out.
    The below code launches internet explorer and goes to the correct website, but won't pass info once loaded, or is passing it before it gets loaded (Done)

    Private mProcess As Process (Global)

    following is inside a sub:

    Dim myProcess As Process = New Process
    myProcess.StartInfo.FileName = "iexplore"
    myProcess.StartInfo.Arguments = "http://www.google.com/"
    myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
    myProcess.EnableRaisingEvents = True

    Me.LaunchedProcess = myProcess
    myProcess.Start()
    myProcess.WaitForInputIdle(1000)
    If myProcess.Responding Then
    SendKeys.SendWait("text goes here")
    Else
    myProcess.Kill()
    End If

    Private Property LaunchedProcess() As Process
    Get
    Return mProcess
    End Get
    Set(ByVal Value As Process)
    mProcess = Value
    End Set
    End Property

    Basically, what I am wanting to do, is Start the default brower with the "http" address and once it gets loaded, be able to pass it info...

    any help on getting it to pass the data, after the site has loaded, or a way to set the FileName to whatever that persons default browser is, would be greatly appreciated!!
    Last edited by czar; 12-02-2005 at 03:51 PM. Reason: updated current issues that still exist in post

  2. #2
    Join Date
    Dec 2004
    Posts
    717
    "some issues now working" Now is working? :-)
    Best Regards,
    Michael Sync
    http://michaelsync.net

    The more you share,The more you get

  3. #3
    Join Date
    Dec 2005
    Posts
    4
    No, still not working. I edited out the issues that I fixed. Still have problems launching default browser by just using the http, and also being able to wait until website is loaded before passing it info.

  4. #4
    Join Date
    Apr 2004
    Location
    New York City
    Posts
    538
    Why not use the Webbrowser control, hosted in your program's form, for this?

    There is a DocumentCompleted() event for the Webbrowser control. You would place the code that passes the information in that event.

    And you wouldn't have to worry about which browser the client is using!


    -Andrew
    Last edited by Andrew Cushen; 12-02-2005 at 04:21 PM. Reason: Misread original post

  5. #5
    Join Date
    Dec 2005
    Posts
    4
    I am using Windows Forms in VB.

    I looked around for the WebBrowser stuff, but could only find info if I was using Web Forms....is this something that can be done in Windows forms, if so, is there a link you can give me that will point me in the right direction.

    Thanks in advance.
    Patrick

Similar Threads

  1. Use Case Semantics
    By Jason Mowat in forum Architecture and Design
    Replies: 2
    Last Post: 05-30-2002, 02:57 PM
  2. Replies: 0
    Last Post: 04-28-2002, 07:07 PM
  3. Replies: 1
    Last Post: 03-28-2002, 09:35 AM
  4. Replies: 0
    Last Post: 05-03-2001, 09:32 AM
  5. Hungarian naming convention
    By Bob Rosen in forum authorevents.patrick
    Replies: 1
    Last Post: 09-05-2000, 08:21 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