Weird Exception
-
Hello everyone, I think tonight is not my night... I wondering if any of you has gotten this exception or know why i am getting it. System.InvalidOperationException was unhandled Message="SetCompatibleTextRenderingDefault must be called before the first IWin32Window object is created in the application." Source="System.Windows.Forms" StackTrace: at System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(Boolean defaultValue) at Client.Program.Main() in I:\Documents\Server\Client\Client\Program.cs:line 17 I have 2 applications a client and a server and i Compiled them both on the same computer before it did not seem to be any problem but not it does... I wonder why? Thanks in advance
Luis E Tineo S
-
Hello everyone, I think tonight is not my night... I wondering if any of you has gotten this exception or know why i am getting it. System.InvalidOperationException was unhandled Message="SetCompatibleTextRenderingDefault must be called before the first IWin32Window object is created in the application." Source="System.Windows.Forms" StackTrace: at System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(Boolean defaultValue) at Client.Program.Main() in I:\Documents\Server\Client\Client\Program.cs:line 17 I have 2 applications a client and a server and i Compiled them both on the same computer before it did not seem to be any problem but not it does... I wonder why? Thanks in advance
Luis E Tineo S
Looks like a race condition, and it looks like you're setting this property too late in your application's lifetime.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Looks like a race condition, and it looks like you're setting this property too late in your application's lifetime.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hello everyone, I think tonight is not my night... I wondering if any of you has gotten this exception or know why i am getting it. System.InvalidOperationException was unhandled Message="SetCompatibleTextRenderingDefault must be called before the first IWin32Window object is created in the application." Source="System.Windows.Forms" StackTrace: at System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(Boolean defaultValue) at Client.Program.Main() in I:\Documents\Server\Client\Client\Program.cs:line 17 I have 2 applications a client and a server and i Compiled them both on the same computer before it did not seem to be any problem but not it does... I wonder why? Thanks in advance
Luis E Tineo S