Problem with winforms

G

Guest

I am having a problem with winforms in C#. When I run the release build of an app that I have finished, the app takes an excessive amount of time loading and switching between forms (mdi). I know there are several routes I can take to deal with the loading time, but I am really confused about the time it takes to switch windows. Just switching windows causes the app to consume all available cpu time for about 1.5 to 2 seconds. This results in different controls becoming visible at different times and overall looks pretty ugly

The two windows I am switching between have about 2400 and 950 lines of code, respectively. The mdi container window has about 1420 lines of code. I am coding with 1.0a

Any help/suggestions would be greatly appreciated

Paul K
 
G

Guest

Paul

If you haven't already done so, I would recommend knocking up a very simply MDI app with just a couple of barebones forms that have no additional code. This might help you to pinpoint whether it is something to do with your code or if the issue is being caused by the .NET Framework

Also, have you tried running the release on more than one end-user machine to try and elimiate any problems that may be specific to one or more machines

Gary
 
G

Guest

Gary

I did create a mock-up of the forms in a new project: the switching was fine. However, when I copied the existing project and deleted all of the code in the forms in question the slowness problem was still there. Also, I did install the app on several different machines with vastly different configurations. The problem was still there

Is it possible that there's something messed up in the project file that could be causing this problem

Thanks

Paul K
 
U

Uri Dor

how about profiling the app? Haven't tried it, but I've heard Compuware
has a .NET version for free
 
G

Guest

Gary, Uri, and anyone else

Figured out the source of the problem -- the mdi form was messed up (still trying to find out exactly WHAT is messed up). I copied all of the controls and code to another form -- no problem switching forms now

Things that make you go hmmm..

Thanks

Paul K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top