Tuesday, March 20, 2012

How to disable the exception of cross threading.

With the code bellow you cane disable the exception for "Controls created on one thread cannot be parented to a control on a different thread."

It is not good to do this, but when you have a legacy application to covert it is nice to know that you can.

System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;

Sunday, September 18, 2011

Red X after refresh on DataGrid on C# Winforms

Got the following solution from this forum entry on the comments

--------
Probem is probably that after you clear datasource it start repainting datagridview and if you start fill it during it, it throw exception.

Problem is that it not seems very good, there is a little blink.

I found just one dirty trick:

Before changing data in datasource set visibility of datagridview to false and after it set visibility to true.

---------------------

Did the following on my binding code:

dataGridViewProcedure.Visible = false;

dataGridViewProcedure.DataSource = procedureList;

dataGridViewProcedure.Visible = true;

Kitematic - Self Signed Certificate In Certificate Chain

Found this issue while behind a enterprise proxy. Proxy uses self signed certificate. Windows has the certificate as trusted, docker works f...