Web Browser in Windows App

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm hoping to verify that we are on the right track. We have a windows based
application that we are developing which allows the user to fill out various
loan application forms. There are several pages for each loan application
and 20 fields for user entered data on each page. The loan applications will
also change format over time. We don't want to create a separate windows
form for each application and the layout is such that it would be difficult
to build the pages on the fly. So our design thought was to place a Web
Browser control in the windows form. Each loan application and page would be
stored in a DB as HTML. Then we would display the page allowing the user to
change the text box values, etc in a web browser control. On the click of a
button (inside the browser control or in the Window app??), we could pull the
fields out of HTML and the associated user entered values and store them in
the DB for that loan application page. Does this sound feasible? Is there a
better control to use? I'm familiar with TXText, but it's expensive and
sometimes difficult to work with. Any advice is appreciated.
Thanks.
 
On the click of a
button (inside the browser control or in the Window app??), we could
pull the fields out of HTML and the associated user entered values and
store them in the DB for that loan application page. Does this sound
feasible?

I would make the WebBrowserControl call a web app. The web app will
display templates with the appropriate boxes and save the data to a
database.

This way - all saving logic is placed server side - preventing clients
from mangaling the data.

With my app - I used regular expressions to parse out custom tags within
formatted HTML. I defined my input fields as text - i.e. [text
name="Address"]. My regular expressions (ASP.NET) would parse out these
fields and dynamically generate the input form.

Here's another idea I've done before - build a plugin system. Each form
is a DLL inheriting a common interface. This allows you to build
customized forms/apps but have the ability to load it from 1 interface.

Here's an article on how to build a plugin system with VB.NET:

http://www.developerfusion.co.uk/show/4371/

So lots of ways of doing it - I've done it in ASP.NET using text parsing
+ dynamic form generation as well as using plugins and customized forms.

Text parsing allows for easier changes (no need to deploy DLLs to the
client) but has less customizability. Option #2 allows you to build
really fancy apps (in esscence each DLL is a unique app) but requires
more dev time.

P.S. Adobe also has an input form application ... you might want to look
at that as well.
 
Thanks for your reply. I forgot to mention, they don't have an Intranet on
site and don't desire an Internet based app (because they don't want to host
it) so I think that kills the server option or ASP.NET. If you use adobe
forms, I assume you would need ADOBE plus their dev tool kit (to interface
into an application). Will what we suggested work?

Spam Catcher said:
On the click of a
button (inside the browser control or in the Window app??), we could
pull the fields out of HTML and the associated user entered values and
store them in the DB for that loan application page. Does this sound
feasible?

I would make the WebBrowserControl call a web app. The web app will
display templates with the appropriate boxes and save the data to a
database.

This way - all saving logic is placed server side - preventing clients
from mangaling the data.

With my app - I used regular expressions to parse out custom tags within
formatted HTML. I defined my input fields as text - i.e. [text
name="Address"]. My regular expressions (ASP.NET) would parse out these
fields and dynamically generate the input form.

Here's another idea I've done before - build a plugin system. Each form
is a DLL inheriting a common interface. This allows you to build
customized forms/apps but have the ability to load it from 1 interface.

Here's an article on how to build a plugin system with VB.NET:

http://www.developerfusion.co.uk/show/4371/

So lots of ways of doing it - I've done it in ASP.NET using text parsing
+ dynamic form generation as well as using plugins and customized forms.

Text parsing allows for easier changes (no need to deploy DLLs to the
client) but has less customizability. Option #2 allows you to build
really fancy apps (in esscence each DLL is a unique app) but requires
more dev time.

P.S. Adobe also has an input form application ... you might want to look
at that as well.
 
Lisa,

What is it that you want to use a webbrowser. The way I read it, is a
textbox or a richtexbox more than enough. Asked in another way, what you
expect from the HTML?

Although what you want is not impossible, however needs a lot of knowledge
from HTML and VB.Net and a lot of time because the documentation goes not so
far in this. The the webbrowser does not always work as expected. It is only
an easy wrapper around IE.

In fact am I busy with something as you write (a new editor for our 2.0
website) and have past all the hard problems.

Cor
 
Thanks for your reply. I forgot to mention, they don't have an
Intranet on site and don't desire an Internet based app (because they
don't want to host it) so I think that kills the server option

You'll need a server anyways right? Where are you going to save the data
to?

or
ASP.NET. If you use adobe forms, I assume you would need ADOBE plus
their dev tool kit (to interface into an application). Will what we
suggested work?

Yes you need their dev tools + server + reader.
 
Hello,

I think this solution is possible. The webbrowser control ( in VS.NET 2005)
has a property named "Document" which is a HTMLDocument object. It can call
its GetElementById method to get the elements in the web page, for example,
a TextBox or a Dropdown Box.

Any, you may also take a look at InfoPath in MS Office solution:

http://www.microsoft.com/office/infopath/prodinfo/default.mspx

It is alos a flexible solution when user need to fill multiple forms and
submit to database.

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Yes, I will have a server, but they do not run IIS, so I wont have the
ability to Submit asp pages.
 
I wanted to use a web browser, because I have the form which will prompt the
user for values and I would like to retrieve the values which the user
entered. I don't believe that I could do that with a text box or rich text
box unless I developed the forms using labels. For instance Application may
have field Enter premium: [Text box to enter premium]. I don't want to put
this as a label and text box on the form because it may be on Page 1 of the
application this year and page 2 next year or it may appear this year and be
completely gone next year. I don't want to create a new form for each year.
I thought placing it in HTML would allow this versatility without as much
maintenance from year to year. Make sense?

When you say that the webbrowser control does not work as expected, is that
with straight HTML or ASP or ?. Just curious what types of roadblocks you
have run into.

Thanks.
 
Yes, I will have a server, but they do not run IIS, so I wont have the
ability to Submit asp pages.

In that case, I would go with a custom Plug-In System - and run a remoting
service to read/save sata.
 
Back
Top