Reference to control

Hello,
i want to disable all controls on a window:

[code]dim c as control

For i As Integer = 0 To Self.ControlCount - 1
c = Window.Control(i)
c.enabled=false <------
Next[/code]

every control has a property “enabled” and when c is a reference to a control, why can i not just use

c.enabled=false?

[code]dim c as control

For i As Integer = 0 To Self.ControlCount - 1
c = Window.Control(i)
If c IsA RectControl then
Rectcontrol©.enabled=false// <------
End if
Next[/code]

Out of my head

ok, that simple … thanks