Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

Pass Values from .NET Windows App to Open IE Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GPeck - 24 Dec 2004 01:03 GMT
I need to pass several values from a .NET Windows app into an EXISTING, OPEN
IE form.

I found the following code snipped for VB6 elsewhere on the forums--it's
close:

Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate "http://www.kbb.com"
Do Until IE.readyState = 4
DoEvents
Loop
IE.Document.emailsignup.email.Value = "MYEMAIL"

But...
* I need to do with a .NET Windows app, not VB6
* The IE window will already be open (the user must sign on and display it
first--code cann't do that)
* Once items on the IE form have been filled, the IE Window needs to be
brought in focus so the user can fill in other form elements before
submitting.

Ideas?

THANKS!
John Saunders - 24 Dec 2004 03:24 GMT
>I need to pass several values from a .NET Windows app into an EXISTING,
>OPEN
[quoted text clipped - 16 lines]
> * The IE window will already be open (the user must sign on and display it
> first--code cann't do that)

Only one window? If more than one, how will your code tell which is which?
The above code works because it creates the IE window.

> * Once items on the IE form have been filled, the IE Window needs to be
> brought in focus so the user can fill in other form elements before
> submitting.
>
> Ideas?

Were you aware that you can host IE within a VB6 or .NET application? If you
use the WebBrowser control, you'll be in charge of that IE window. You're
not going to get that level of control over arbitrary IE windows your users
have created.

John Saunders
GPeck - 24 Dec 2004 15:17 GMT
John,

Thanks for the reply.

However, as I mentioned, the user will have already opened an IE session to
sign on to an app (my code can't do that for various reasons). So, by design,
my app will need to fill in a form in an existing IE session, despite the
ability to host IE within the app with a WebBrowser control. Also, the user
will need to be able to futher modify the form manually before they submit it.

In terms of the possibility of multiple IE sessions open--that is a
possibility. My app will need to query all open IE sessions and pick the one
with the proper <TITLE> tag.

- George -

> >I need to pass several values from a .NET Windows app into an EXISTING,
> >OPEN
[quoted text clipped - 32 lines]
>
> John Saunders

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.