Search This Blog

Showing posts with label WinForms. Show all posts
Showing posts with label WinForms. Show all posts

Monday, June 25, 2018

Unexpected results with no exceptions being thrown - apparently

If you are facing undesired results or strange behaviors, but are not spotting any exception in run time - make sure you checked all the Common Language Runtime Exceptions in Debug -> Exception Settings.

I was facing an InvalidOperationException due to unsafe cross thread access.
But it was only when I instructed VS to break on all exceptions from the CLR, then I finally got the hint of where/who was raising the exception.

Wednesday, January 10, 2018

C# DateTimePicker ValueChanged event being triggered more than once, without any Value explicit assignments taking place

I spent at least an hour in investigating this issue, even adding a timer object to my form to debug.writeline the value of my datepicker objects periodically so I could have a sense of when the problem occurs.

As I noted [here], in the end my problem was with setting the MaxDate property of both parameters, to the same DateTime object. Noting this down here in case it may be of public help...

Wednesday, December 6, 2017

Having problems setting 2 panels in a windows form, where one is top-docked and the other fill-docked, but the fill-docked one is overflowing into the top one ?

Play with the panels "send to back" / "bring to front" (mouse right click).