473,789 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stop the VS.NET Window from closing

Hi,

I wanted to stop the VS.NET Window from closing inside my C# AddIn.

I Know that OnBeginShutdown () funciton will be called whenever the user tries to close the VS.NET window.
I want to check some conditions and if those conditions doesnt meet, then I want to stop the VS.NET window from closing.

Anybody have any diea?
Nov 15 '05 #1
3 1933

Hi, Saradhi
I wanted to stop the VS.NET Window from closing inside my C# AddIn.

I Know that OnBeginShutdown () funciton will be called whenever the user tries to close the VS.NET window. I want to check some conditions and if those conditions doesnt meet, then I want to stop the VS.NET window from closing.

Anybody have any diea?


Use Form.Closing event. If you want cancel closing form then set event
CanceEventArgs parameter Cancel property to true.

Nov 15 '05 #2
where is the form here?
I am talking of stopping the VS.NET window from closing inside my Add-In.
"Roman S. Golubin" <no************ *@arhcity.ru> wrote in message news:c1******** **@arhadm.atnet .ru...

Hi, Saradhi
I wanted to stop the VS.NET Window from closing inside my C# AddIn.

I Know that OnBeginShutdown () funciton will be called whenever the user tries to close the VS.NET window. I want to check some conditions and if those conditions doesnt meet, then I want to stop the VS.NET window from closing.

Anybody have any diea?


Use Form.Closing event. If you want cancel closing form then set event
CanceEventArgs parameter Cancel property to true.


Nov 15 '05 #3

Hi, Saradhi!
where is the form here?
I am talking of stopping the VS.NET window from closing inside my Add-In.


Hmm... "VS.NET window"... What is this?

Nov 15 '05 #4

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

Similar topics

31
2854
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page www.any.xy an setting the focus to "extern". But when I go return to "main" without closing "extern", a click to an other link (e.g. www.2nd_any.xy) on "main" does not setting the focus to "extern".
10
9817
by: Tom Szabo | last post by:
Is there an event when that triggers when the window is closing.... I am talking about when the user clicks on the cross on the right top corner of the window!!!
7
4681
by: Gayathri | last post by:
Is there anyway to disable the stop button in IE 6? Without doing "Opening in new window and toolbar is set to no" what will document.onstop help in?? I need to capture the browser stop event...is it possible?
0
274
by: Saradhi | last post by:
Hi, I wanted to stop the VS.NET Window from closing inside my C# AddIn. I Know that OnBeginShutdown() funciton will be called whenever the user tries to close the VS.NET window. I want to check some conditions and if those conditions doesnt meet, then I want to stop the VS.NET window from closing. Anybody have any diea?
2
2042
by: Bob Cummings | last post by:
Greetings I am sure this is a simple question. But I have "googled" it to death and have only found one answer that involved a bunch of window's API calls that I did not understand. I am a student taking VB.NET and we are studying the Validation event and how to use it on text boxs. I have set the forms.causevalidation property to false. But if the user has bad data in the text box and just wants to quit the program by clicking on...
2
3023
by: Tom | last post by:
How is the best way to avoid validation when closing a window? For instance, I have a Windows Forms window which has a validation event for a text box. However, if one enters invalid data in then and then attempts to close the window (either via my custom 'Close' box or by clicking the close 'X' in the upper right window corner), the validation event still triggers and it tells the user that they have invalid data. Which of course means...
1
2324
by: JohnR | last post by:
I have a form that is presented in an mdi child window. If the user hits exit or the X button on the titlebar of the mdi child form, that form's "closing" event fires and in that event I check to see if there are any outstanding database changes that have not been saved. If there are I give the user the option of abandoning the closing of the form by issuing a "e.cancel" statement. This works perfectly if the user hits the X in the...
1
1771
by: sachin jain | last post by:
hi all, I am facing this problem ...i av a datagrind with buttoncolumn as linkbutton. on clicking it i m opening a popup window and on this popup window i av a button on whose clickevent i m using window.opener.location.reload(); to refresh the parent window and then closing the child window. my problem starts here when parent window get refresh it again fires the last event of datagrid again opening the poup window..... So plz can any one...
5
12805
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for more incoming connections and does the BeginAccpet() again. It does an infinite loop this way. My question is: What is the best way to stop this? I thought about putting a boolean in there, but then what if it's still waiting for an incoming...
0
9511
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
10408
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
10139
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
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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
5417
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...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.