Control names changes after placing on a panel

reinier

Member
Joined
Jan 11, 2005
Messages
6
Programming Experience
3-5
Hi! :)

(I use:VB.NETV2005Beta2,WindowApplication, SQL-database)
I have made a large Form with a lot of controls on it, (approx. 200!).

NOW, I come to the conclusion that most of them have to move,
from the windows form to (several) Panels.

Problem::(
After moving controls to a panel, VB renames all the controls, and place a '_1' after the names of the controls: for instance, MyButton_ClickEvent changes to MyButton_1_ClickEvent.
With this, all of the events are lost. Ofcourse this can be solved with
Contr_C & Control_V, but for 200 controls, this would be 5 hours work!

Question::rolleyes:
Does somebody have a trick to overcome this?




Thanks!

Reinier
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
i dont know about vb2005 but in vb2003 you can highlight all the controls you want to move then drag and drop them into a groupbox/panel and visa versa

it doesnt rename anything and all the events are still intact and run normally, i highly doubt MS would change that feature in vb2005 i wouldnt upgrade if they did either
 

reinier

Member
Joined
Jan 11, 2005
Messages
6
Programming Experience
3-5
Thank you my man, I solved it now for the time being by taking
all the event for a control, move it to a word doc, then move the
control, and then place the events back into .NET.

I tried your option, didn't work, sorry.

Reinier:)
 
Last edited:
Top Bottom