473,654 Members | 3,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting window.close in WebBrowser control

I have a situation where i have a form that contains a
webbrowser control. With this I was able to implement an
application that can browse websites. One particular
website i visited opens up another web page in a new
window and then closes it. I was able to control this
action by detecting the 'NewWindow' event and opening the
webpage in my own application.

Now the problem i have come across is that when the
webpage that was opened in a new window exits (i think it
is the result of a scripted 'window.close') the
webbrowser control that was displaying the webpage closes
and i am left with an empty form.

What I would like to do is detect the webbrowser control
closing and close the form it is contained in. The
WebBrowser control ignores the 'Quit' and 'OnQuit' events
which i thought could have been used to do this. The only
event i have been able to detect is the 'WindowClosing'
event, though this fires before the webbrowser control
actually closes. Has anyone come across this problem or
am i not using the webbrowser control properly? I would
greatly appreciate any feedback.
Nov 20 '05 #1
1 5568
guest
25 New Member
I also have this problem and I'm monitoring a few topics for replies.
May 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
18307
by: Noozer | last post by:
When using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window? This is what I've written in the NewWindow2 event, but I can't figure out how to get the popup to appear in the same browser window. In this code the user is presented with "Yes", "No" or "Cancel". Yes allows the popup to spawn a window, No should load the popup in the same window and Cancel...
1
4009
by: bill ramsay | last post by:
Dear all. I am using an existing hodge-podge of an application that runs on top of an Access database. This application dials up customer equipment, handshakes then downloads/uploads various bits of information in the access database. The original application is designed for some poor sod to sit there for hours and manually do the necessary.
1
7972
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script : VBScript and Javascript Client : 1. IE browser. 2. VBForm embedded with WebBrowser control (MS Internet
4
2255
by: Hal | last post by:
Can someone please tell me what is wrong with this script? <script language="JavaScript"> <!-- function HF_CloseAllChildren() { if (g_win1) != undefined { if ((g_win1) && !(g_win1.closed)) g_win1.close(); } }
0
431
by: Tuong | last post by:
I have a situation where i have a form that contains a webbrowser control. With this I was able to implement an application that can browse websites. One particular website i visited opens up another web page in a new window and then closes it. I was able to control this action by detecting the 'NewWindow' event and opening the webpage in my own application. Now the problem i have come across is that when the webpage that was opened in...
1
7444
by: Nico Grubert | last post by:
Dear Python developers, I use a short python script in order to run an external application plus to open a browser displaying a default page. My Setup: Python 2.4.3. / Windows2000 # ---------------------------------------------------------------------- # Script "shortcut.py" import os
0
2019
by: =?Utf-8?B?c25naWxi?= | last post by:
I am having 3 issues with the WebBrowser control which may all be related. The HTML for the page is the standard Weather Magnet from weather.com. The actual HTML is at the bottom of this page. Issue 1: I am opening a page in the control in the development environment and the document comes up correctly. But, when I click a link in the resulting document, an external IE instance comes up with the requested page. I have see reference to...
1
1905
by: nagar | last post by:
How can I detect when the user pastes text into a WebBrowser control in edit mode? I tried subclassing the control and processing the WM_PASTE message in the WindowProcedure with no results. I'm using .NET 2.0 c# Thanks. Andrea
0
1155
by: endy_tj | last post by:
Hi all, I have a window that displays video. The video is shown by using a wrapper provided by the kind folks at http://www.mentalis.org/. The way the wrapper work is by calling MCI API (Multimedia Control Interface) to open a child window within my window. Now what I want is to capture click event in the child window. The window is some sort of screen saver that displays video. In case the user clicks the video, I want to close the...
0
8376
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8489
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8594
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2716
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.