Thanks again for the support.
I tried your code in the CRM and as you said, it worked as expected.
Now I put the code in the Maintenance Form as suggested in my project and what I am seeing is that the form will not render until it is moved by me using the mouse.
Please take a look at this small video sample that illustrate what I am experiencing: http://www.progytech.com/videos/SF_Sample2/SF_Sample2.html
Just to clarify:
We wrote our own MDI environment for our medical application so that rendering would be faster. However, one thing that is generally a bad idea is to just set the IsMDIContainer property to true...many issues come from doing this.
You are always better of creating an MDIClient class and then adding it to your form, which will in affect turn that form into an MDI. I have attached a sample of how to do this. You can then take this to the next level by adding form loading logic, etc, when it is added to the MDI. You can render the back of the MDI client (in this sample I just set the background to white). But there are a lot of things that you can do.
This at least gives you more control than just setting the IsMDIContainer proeprty to True and then you can start to create your application environment.
Will check your sample and implement in my current project. Once again, your help is must appreciated.
Trent,
You certainly nailed the problem with this sample solution. In no time I was able to replace the old code in my Main Form and now the rendering problem is virtually gone.
I took the liberty of adding some functionality to the LaunchForm method that will do the following:
Here is the changed code:
loForm =
currentForm.WindowState = FormWindowState.Normal
currentForm.BringToFront()
loForm.MdiParent =
loForm.Show()