Thanks for the advice. I now have the following, but I can't seem to set the
checkboxes width and location. The width needs to be 168 and the vertical
location needs to be 40 down from the previuos checkbox?
string[] databases = {"Master.mdb", "Toolbox.mdb", "Import.mdb",
"Library.mde", "User.mdb", "ImpData.mdb"};
for ( int j = 0; j < databases.Length; j++ )
{
if ( File.Exists(dbFolder + databases[j] ))
chk.Name = databases[j].ToString();
chk.Checked = true;
chk.Location = new System.Drawing.Point(j,chk.Location.X);
chk.Location = new System.Drawing.Point(j,chk.Location.Y);
chk.Text = databases[j].ToString();
chk.ThreeState = false;
Controls.Add(chk);
this.Refresh();
"Cor Ligthert" wrote:
Jez,
You mean something as
\\\
foreach (string str in databases) if (File.Exists(str)) blabla;
///
http://msdn.microsoft.com/library/de...xiststopic.asp
I hope this helps,
Cor