473,809 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form error equivalent

In web forms i can do this
this.Error += some handler?
what is the equivalent for a winform? I'd like to catch unhandled form
exceptions.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Nov 15 '05 #1
2 1128
You can put this in your code (most likely main). This will catch all
unhandled exceptions in your application (unless you create new
AppDomains -- if you don't know if you are or not, then you're not)
AppDomain.Curre ntDomain.Unhand ledException += new
UnhandledExcept ionEventHandler (CurrentDomain_ UnhandledExcept ion);



"Alvin Bruney" <vapor at steaming post office> wrote in message
news:OF******** ******@TK2MSFTN GP12.phx.gbl...
In web forms i can do this
this.Error += some handler?
what is the equivalent for a winform? I'd like to catch unhandled form
exceptions.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b

Nov 15 '05 #2
thanks, there seems to be no page or form level equivalent in winforms like
there is in webforms. I'll use what you suggested (or rather pass it on to
lady who asked).

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Philip Rieck" <st***@mckraken .com> wrote in message
news:OV******** ******@tk2msftn gp13.phx.gbl...
You can put this in your code (most likely main). This will catch all
unhandled exceptions in your application (unless you create new
AppDomains -- if you don't know if you are or not, then you're not)
AppDomain.Curre ntDomain.Unhand ledException += new
UnhandledExcept ionEventHandler (CurrentDomain_ UnhandledExcept ion);



"Alvin Bruney" <vapor at steaming post office> wrote in message
news:OF******** ******@TK2MSFTN GP12.phx.gbl...
In web forms i can do this
this.Error += some handler?
what is the equivalent for a winform? I'd like to catch unhandled form
exceptions.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b


Nov 15 '05 #3

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

Similar topics

1
1914
by: Sean Abrahams | last post by:
The following is a reprint of a message I sent to the tutor list a long time ago, that I haven't gotten around to discussing with anyone else and failed to hear a reply on the tutor list. Hoping someone here may want to have some dialog. -- I'm learning to write unit tests and am trying to write them for a web application I'm working on.
0
1743
by: - | last post by:
is there a '@@rowcount', '@@error' equivalent in mysql to use inside a stored procedure after a query statement?
3
1670
by: Jeremy | last post by:
I am creating a form that a person enters a date span in yyyymm form. I want a box to pop up that tells the user "Please enter date in correct format" if the user has entered the data incorrect. I have entered the input mask and the auto tab order. I have done this before, but I cannot remember the syntax for the code to pop up the error box. Please help.
0
3936
by: Trevor Best | last post by:
Access 2002 MDB -> SQL Server 2000 - ODBC Linked tables. B4 we start, this is not occurring in a recordset operation and yes I googled, even found my own fix, which I already use (http://tinyurl.com/2e8os) but in one particular form it's getting worse, sometimes accompanied by a "Another user has modified the data" or something or that the form's values have reverted back to their old values before my workaround in the Form_Error event...
1
1212
by: Paul Mendez | last post by:
Whenever I first try to enter data into my form, it prompts me with this following error: "The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data." But it will still let me enter my data, but it always comes up for every new record I try to enter. The field I am entering it to is a date field. Any suggestions on how to get rid of this distraction? Thanks Paul Mendez
8
2430
by: Tom | last post by:
Hi I have an aspx page which has javascript to configure xmldata. I added breakpoint to the button method. When I click submit button, it did not go to those breakpoint and show the following error System.Web.HttpRequestValidationException (0x80004005) Detect the potential danger of Request.Form value from client side (idHidxml="<recordset><record><...") System.Web.HttpRequest.ValidateString(String s, String valueName, String...
13
4038
by: knot2afrayed | last post by:
I am trying to fix error- object does not exist- I want it possible to allow object not to exist. I am writing a script on a page that may or may not include a login form. For example-after a visitor logs in, the login form is no longer on the page, but other content is still there. I want to bring focus to the login form using the onLoad in the body tag.....but if the login form does not exist, I do not want to perform this function.
0
1625
by: Wayne Smith | last post by:
I've taken the following code from a developers web site which should allow a user to register and receive an email message with a link to activate their account, but when I click the link on my home page to take me to the 'registration.aspx' page, it throws up the following error message and I can't figure out why. ------------------------------------------------------------------------------ Server Error in '/' Application. ...
2
1687
by: JMasterJ | last post by:
Parse error: syntax error, unexpected T_STRING in /home/pbgwell/public_html/process-form_CC.php on line 16 Hi all! First post so take it easy on me if i make a mistake. I have done many post forms before, and basically I do it "fool proof" way, save the last one as the new one and edit the data. I am not the PHP expert but I am not totally clueless either, and this has worked until now. I have checked for semicolons and quotes, but the...
0
9601
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
10635
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...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10378
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
9198
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
7653
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
6881
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
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3013
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.