Fabian_Russ Posted November 6, 2009 Posted November 6, 2009 I've searched everywhere online and can't find anything on this. Is there was any way to migrate all controls from form to form? I've tried For Each Ctrl as Control in Form2.Controls Form1.Controls.Add(Ctrl) Next I get skipped controls and ect... but... If I try to get the name of each control For Each Ctrl as Control in Form2.Controls Debug.Print(Ctrl.Name) Next It does not skip any and the debugger prints every control's name just fine. Any Ideas? This is really bothering me. Quote
Fabian_Russ Posted November 6, 2009 Author Posted November 6, 2009 I have fixed it! :D If anyone has the same problem I experienced, Try this! Me.Controls.Clear() Dim TempControlRange(1000) As Control Form2.Controls.CopyTo(TempControlRange, 0) Me.Controls.AddRange(TempControlRange) Works like a charm! Quote
Leaders snarfblam Posted November 6, 2009 Leaders Posted November 6, 2009 Could the problem be that you are adding controls to the second form before removing them from the first? Quote [sIGPIC]e[/sIGPIC]
Fabian_Russ Posted November 9, 2009 Author Posted November 9, 2009 Could the problem be that you are adding controls to the second form before removing them from the first? I think it is fixed now, thanks for posting though :D! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.