private void changeFont()
{
Control.ControlCollection controls = tabControl1.Controls;
foreach (Control control in controls)
{
TabPage t = (TabPage)control;
Control c = t.GetChildAtPoint(new Point(250, 250));
System.Type type = typeof(c); //-->1st error
((type)c).changeFont(fontModifier); //-->2nd error
}
}
Error 1 The type or namespace name 'c' could not be found (are you missing a using directive or an assembly reference?) Error 2 The type or namespace name 'type' could not be found (are you missing a using directive or an assembly reference?)
What's wrong with it? Just for the context, i'm trying to go through the tabcontrol and in each tabpage we have a user control, so that's why the getChildAtPoint is that particular position. In all the usercontrols, we have a changefont function that'll change the size of the font of specific controls....
Thanks :)