web browser in vb.net.
-
Experts, I have a web browser in vb.net, works like a treat :) However is there any way that on a button click in the html web page through vb.net, can i then have a button that is invisible in vb.net to be then be visible to the user on the vb page. e.g the web page is shown but the user doesn't do any thing. - nothing happens the user types something in - nothing happens on the vb side the user types something in a presses the submit buttons - a vb button appears allowing them to continue. Any ideas? Dan
-
Experts, I have a web browser in vb.net, works like a treat :) However is there any way that on a button click in the html web page through vb.net, can i then have a button that is invisible in vb.net to be then be visible to the user on the vb page. e.g the web page is shown but the user doesn't do any thing. - nothing happens the user types something in - nothing happens on the vb side the user types something in a presses the submit buttons - a vb button appears allowing them to continue. Any ideas? Dan
Hi, you could; 1. modify the web page any way you like, it is available as WebBrowser.DocumentText 2. add JavaScript (assuming JS is enabled). 3. add/modify hyperlinks, possibly pointing to your own web site 4. provide an embedded HTTP server, which means your own web site could be embedded inside your app (see e.g. Sample HTTP Server Skeleton in C#[^]) :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.
-
Experts, I have a web browser in vb.net, works like a treat :) However is there any way that on a button click in the html web page through vb.net, can i then have a button that is invisible in vb.net to be then be visible to the user on the vb page. e.g the web page is shown but the user doesn't do any thing. - nothing happens the user types something in - nothing happens on the vb side the user types something in a presses the submit buttons - a vb button appears allowing them to continue. Any ideas? Dan
It sounds like you have a WebBrowser component displaying some HTML embedded in a windows Form, and you want to respond to events that cause a postback in the web page in the windows form. I am assuming that is what you are getting at. We have a similar thing where html is used to display details inside a windows form and hyperlinks cause a new windows form to pop up instead of navigating in the HTML. We do this by handling the
BeforeNavigate
event of the browser and interrogating the URL requested. If the URL requires custom navigation in the windows application then we sete.Cancel = True
to stop the default navigation continuing and instead run our own custom code. It is all a bit messy, but that is the price for a hybrid windows/web solution.If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles] [My Website]