I was wondering if anyone knew how to use properties of a form before using the .Show() method, or possibly another way to fix my real problem.
Im developing a program which has one form as an mdiparent. In this form I have a method named SwitchForm that other child forms call.
Public Sub SwitchForm(ByRef openerForm As Form, ByVal newForm As Form)
openerForm.TopMost = True
newForm.MdiParent = Me
newForm.Left = 0
newForm.Top = 0
Basically what this method is used for is to open the new form I want to close the form that called the method and open the form designated using the mdiparent form as intermediate to not trick the taskbar into thinking its a new program (if you know what I mean). This works how I want it, however, the cascading (due to the mdi) is causing the new child form to move a little to the right and down from where the old form was.
Anything i've tried (after the .Show() method setting the left and top to 0, or docking the new form) causes a flicker type action).
I figured if I could set the left and top to 0 BEFORE the .Show() method, this would fix my flicker, however, it seems I can't set its properties before the .Show() method.
I also figured that if there was someway to have the old form top most and create the new form under, then set its properties then close the old form it would also fix my problem, but I cant seem to find a way to do this.
Anywho, does anyone have an idea of what possible solutions I could use?
Thanks in advance