Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2006

Tip: Looking for answers? Try searching our database.

[.Net 1.1] Strange error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adam Klobukowski - 14 Mar 2006 15:54 GMT
Hello

I have a scrollable System.Windows.Forms.Panel, and I add/remove
controls (ListView only) to/from it programatically.

Sometimes, probaly when redrawing the panel while adding/removing
controls or scrolling the panel i get an infinite loop of messageboxes
saying "invalid parameter used" but no exceprion is thrown. It happens
randomly, I cannot reproduce steps to achieve it.

I do not do any painting operations on it, I handle only few events
related to mouse and SelectedItem in listview.

Wha co I do to avoid it?

Signature

Semper Fidelis

Adam Klobukowski
atari@gabo.pl

Mehdi - 14 Mar 2006 17:02 GMT
> I have a scrollable System.Windows.Forms.Panel, and I add/remove
> controls (ListView only) to/from it programatically.
[quoted text clipped - 3 lines]
> saying "invalid parameter used" but no exceprion is thrown. It happens
> randomly, I cannot reproduce steps to achieve it.

None of the methods of the .NET Framework classes display any message box
unless you explicitely ask them to. So you must have some code somewhere
that catches some (or all) of the exceptions and displays a message box
with the exception message instead of letting the exception bubble up. Find
this code and remove that so that you can trace where the problem comes
from.

Or are you talking about Visual Studio's unhandled exception dialog box
that pops up automatically whenever an unhandled exception occurs in your
code? In this case, run your application in Debug mode and when this dialog
box pops up, click the Break button to break into your code. From there,
you'll be able to examine your stack trace and the state of your objects to
determine why the exception has been thrown.

In any case, you can always configure Visual Studio to break into your code
whenever an exception (handled or not) is thrown by going to: Debug menu ->
Exceptions -> Common Language Runtime Exceptions -> When an exception is
thrown: break into the debugger.
Adam Klobukowski - 15 Mar 2006 09:13 GMT
Mehdi napisał(a):

>> I have a scrollable System.Windows.Forms.Panel, and I add/remove
>> controls (ListView only) to/from it programatically.
[quoted text clipped - 22 lines]
> Exceptions -> Common Language Runtime Exceptions -> When an exception is
> thrown: break into the debugger.

The problem is I'm 100% sure that not my code is displaying it - the
strange thing in it is that text in message box is bold. I do not
remember any standart .NET messagebox being able to output bold text.
Moreover, there are 3 MessageBox.Show calls around that code, but all of
them display fixed text.

I know I can catch any exception, but the problem is that it happens
really randomly and when I try to trigger it it just does not happen.

Signature

Semper Fidelis

Adam Klobukowski
atari@gabo.pl


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.