By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,165 Members | 1,394 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,165 IT Pros & Developers. It's quick & easy.

Suggestions for Dynamic controls

P: n/a
Hi Everyone,
I'm in the process of designing a app that will load control dynamically
from an xml file and need a few questions.
1. Once the form is loaded with the controls needed, how do you access the
properties of the control. I just started to play with it today, and noticed
that I can't seem to get the values from the controls. Here is the code
snippit that I'm using:

Dim btnOk as New System.Windows.Forms.Button
btnok.Name = "Button4"
btnok.Location = new System.Drawing.Point(32,32)
btnok.Size = new System.Drawing.Size(72,32)
btnok.TabIndex = 10
btnok.Text = "OK"
Panel1.Controls.Add(btnok)
btnok.Visible = True

2. After setting the name property of the control, can't you use that name
to reference the control, or do I have to access it through the btnok
reference, Or do I have to create a reference from that name?

This forms will be used for data entry, and I have about 100 or so docs that
need to be put into this system, so I'll need access to the controls after
they are created. So that I can take the data from the controls and place
them into the bookmarks of Word docs.
Thanks for any suggestions.
Michael

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.