Hallo,
ich habe mal wieder eine Frage, die mir google nicht beantworten konnte. Ich weiß auch gar nicht ob das möglich ist, so wie ich mir das vorstelle.
Ich bekomme aus einer XML-Datei ein Control-Typ, eine Eigenschaft und einen Wert.
Zum Beispiel:
akControlTyp = "Label"
akAttribut = "AutoSize"
akValue = "True"
Jetzt wollte ich in einer Schleife alle [in diesem Fall] Labels auf AutoSize = True setzen. Aber ich weiß nicht recht, wie ich das machen soll. Ich hatte mir das im Schema so ähnlich gedacht:
Dim C as Control
Dim akControlTyp as ?ControlTyp?
Dim akAttribut as ?Attribut?
akControlTyp = Label
akAttribut = AutoSize
akValue = True
For Each C in Form1
If TypeOf C Is akControlTyp
C.akAttribut = akValue
End If
Next
Ich denke, das ist alles eine Sache der Deklaration, aber vielleicht irre ich mich.
Schonmal danke für die Hilfe,
Gruß Simon