Hi, everyone. I am fairly new to VB.Net, meaning I have done a couple of pretty simple apps. The one I am currently working on is quite a bit more complex, however.
What I have is a scheduling program that I need to be able to add controls to a form on the fly. I have a general idea of how I want it to work, but I'm not sure of the commands I need. The part I am working on, the user selects a day of the week from a combobox and the form is populated based on the table data. It works great, but I need it to check how many lines (controls to display the data) are on the form and add/subtract lines as needed.
I have the controls named such as "dtpStaffTimeEnd1" and I'm trying to set it up so that it searches the form for the control with the highest number so that I can determine if I need to add or subtract groups of controls. I was thinking something along the lines of Me.Controls.Find, but I've never used that before and was unsure of the correct usage.
If someone could point me in the right direction, I would be appreciative. Or if there is a better way to do what I'm trying to do I would obviously be open to that also.
Thanks!
What I have is a scheduling program that I need to be able to add controls to a form on the fly. I have a general idea of how I want it to work, but I'm not sure of the commands I need. The part I am working on, the user selects a day of the week from a combobox and the form is populated based on the table data. It works great, but I need it to check how many lines (controls to display the data) are on the form and add/subtract lines as needed.
I have the controls named such as "dtpStaffTimeEnd1" and I'm trying to set it up so that it searches the form for the control with the highest number so that I can determine if I need to add or subtract groups of controls. I was thinking something along the lines of Me.Controls.Find, but I've never used that before and was unsure of the correct usage.
If someone could point me in the right direction, I would be appreciative. Or if there is a better way to do what I'm trying to do I would obviously be open to that also.
Thanks!