FindObject Function

UmoŇĺŇąuje adresovaŇ• objekty za behu programu ako parametre typu string pouŇĺit√≠m n√°zvu objektu.

Napr√≠klad nasleduj√ļci pr√≠kaz:


MyObj.Prop1.Command = 5

zodpovedá bloku príkazov:


Dim ObjVar as Object
Dim ObjProp as Object
ObjName As String = "MyObj"
ObjVar = FindObject( ObjName As String )
PropName As String = "Prop1"
ObjProp = FindPropertyObject( ObjVar, PropName As String )
ObjProp.Command = 5

Toto umoŇĺŇąuje dynamicky za behu vytv√°raŇ• n√°zvy. Napr√≠klad:

"TextEdit1" to "TextEdit5" in a loop to create five control names.

Pozri tieŇĺ: FindPropertyObject

Syntax:


FindObject( ObjName As String )

Paremetre:

N√°zovObjektu: ReŇ•azec urńćuj√ļci n√°zov objektu, ktor√Ĺ chcete za behu adresovaŇ•.

Error codes:

5 Neplatn√© volanie proced√ļry

12 Nedefinovan√° premenn√°

Please support us!