A better understanding of the "New" clause in:
The "As New Form" is asking the system to spawn a new INSTANCE (copy) of FormCode:Dim MyNewForm As New Form
Form is a generic BLANK form and that is why you do not get any contols on it. This is what you get when you add a Windows Form to your project = a blank, generic form.
BUT let us suppose that you have already created MySpecialForm.vb with lots of Textboxes on it and saved it within your project and then executed the following:
Then MyNewForm form (as a copy of MySpecialForm) will deliver what you are seeking.Code:Dim MyNewForm as New MySpecialForm
You are INHERITING all the controls (and methods) of MySpecialForm
And Cimperiali has kindly given you the code to loop through all the controls on the form to let you manipulate the Texboxes in whatever way you wish.




Reply With Quote