Home > How-To Library > Controls
How to create/remove a control in runtime
**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * **************************************************************** 'Once you have created a control array at design time, even with just one item, 'it's straightforward to create new items at run time using the Load command: ' Suppose you created Text(0) at design time. Load Text1(1) ' Move the new control where you need it, and resize it. Text1(1).Move 1200, 2000, 800, 350 ' Set other properties as required. Text1(1).MaxLength = 10 ' ... ' Finally make it visible. Text1(1).Visible = True 'You can remove controls from a control array using the Unload command, as in 'the following line of code: Unload Text1(1)
If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.