troubleshooting Question

C# RichTextBox Control in Windows forms is not visible when built in Release

Avatar of itnifl
itniflFlag for Norway asked on
.NET ProgrammingMicrosoft DevelopmentC#
24 Comments5 Solutions852 ViewsLast Modified:
I have a C# RichTextBox Control in Windows forms that is not visible when built in Release mode. If I run in Debug mode and use the debugger, then the RichTextBox is visible. I am very sure that it is not the code that is setting the RichTextBox as not visible. If that was the case, then the result should be the same in both Debug and Release. I have no conditional code that differs between Release or Debug, thus this can not be affecting this.

Also, when the application is loading after being built in Release mode and run by double clicking the file, it takes a very long time before (up to more then a minute) before the application is started and visible. When the application is run via Visual Studio in Debug mode, it starts instantly and the RichTextBox Control is visible.

I have been trying to solve this some time now, but have not found any solution. I also tried using Process Monitor  to see if there were files that were not loading, but did not find any.

I created a Windows Server 2012 VM and copied the Release compiled exe and dlls over there. When running the application in this VM, it started smoothly and the RichTextBox Control was visible. I myself am running Windows 7, so I tried creating a blank Windows 7 virtual machine and installed .Net 4 Client profile on it. Then checked what would happen when I started the application in there, with same error result(RichTextBox Control not showing and taking a long time to load).

Any ideas to solve this?
Join our community to see this answer!
Unlock 5 Answers and 24 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 5 Answers and 24 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros