Hallo,

was du brauchst ist Casting. Also eine Klasse als andere ansprechen.

window(i) liefert ein window,
control(i) liefert ein control.

Wenn du aus einem Control Objekt ein StaticText Object machen willst, dann schreibst du:

dim c as control // irgendwoher

dim s as statictext = statictext(c)

Jetzt hast du eine neue Variable, die das Control als Statictext anspricht.
Wenn das nicht erlaubt ist, gibt es eine IllegalCastException.

Gruß
Christian


Antwort per Email an