I have a problem in doing something quickly in .NET. I donโt think that something in particular should take a lot of time, but on every machine I tried, I get serious problems. This is implemented in vs2008.NET using C # (with some materials in C ++, but nothing related to the drawing).
I have three screens, and the user should be able to switch between them without delay. On the first screen, there are four buttons, eight user controls, consisting of two buttons and 6 labels, a text field and a drop-down list. I donโt think so much.
On the second screen, I have four shortcuts, six buttons and two controls that have six buttons, one opengl drawing context and about ten shortcuts each.
On the third screen, I have one opengl context and 10 buttons.
Switching from any screen to any screen takes literally about a second. For example, if I flip from the second screen to the first, the entire application will close, showing a background screen, and then the first screen will be drawn. Many times the screen loomed in parts, as if the machine was intentionally made from thin and tasty letters in a factory in Sweden, and then sent each separately to my screen. I exaggerate, and I want to make it clear, because I donโt think the Swedes are as slow as this redrawing.
The first and second screens are displayed in memory and saved there, only with ".Hide ()" and ".Show ()" so that they appear and disappear. Double buffering does not seem to matter. The third screen is drawn again each time and it seems to take the same amount of time to draw both the first and second.
Any thoughts? What could go on? How can I track it?
Thanks!
Edit: I have to add that any C ++ processing and the like happens on its own thread. Sometimes EventInvoke displays the results of the operation on the screen, but this problem occurs without calling any functions, just by pressing buttons to move from one screen to another.