I have some "parameters", like startdate, enddate, prductid for ex. to generate reports. But sometimes i only need for ex. startdate and enddate, others only productid, others all them. I alread done a code to generate controls in runtime mode. But my goal is read the "parameter" for ex. startdate and create a textbox control called startdate to get date, etc ...
You usually create controls dynamically when you do not know beforehand how many controls you coudl need. As an example, if I have a form that has buttons to print reports, and I cannot know when I build application how many reports will be available. This could be done with the technique described by Ark.
In your case however, you know how many controls you might need. In such a situation, it is usually better to create your form as you would, with all the possible controls, but set the the Visible or Enabled property of those that might not be needed to False. The controls are in the form, but the user sees them as inactive (Enabled) or does not see them (Visible).
When, when you need to display information in these controls, simply reset the property to True so that it is activated or visible.
This is not possible to do. What do you need to do that needs this type of requirement?