tags:

views:

172

answers:

2

When I iterate of the controls on my form, I see those which I placed there at design time or run time. They are all of type TEdit, Tmemo, TComboBox, etc ...

However, there are always exactly eight which I do not recognize. I can skip over them, since they are not of a type which interests me, but I am curios.

I am guessing system controls like min/max/close. Their Name property is empty. Is there any way I can determine what type they are (without explicitly testing for every standard component derived from TWinControl) ?

I am curious - but not yellow ;-)


for i := 0 to Form1.ControlCount -1 do ...

Answer: use ClassName to find out. And i got TGrabHandle for all of them.

Thanks for all the help. +! all round

+2  A: 

TObject has the property ClassName; Try to access and interrogate this property for this components.
Paste the code block (for/while) that you are using for interrogate the form, for search components.

Regards

Neftalí
for i := 0 to Form1.ControlCount -1 do ... as stated, their names are empty string
Mawg
then are you using Form1.Control[i] to access them?
glob
yes, I am (but I need min 15 chars to say that, else I'm not allowed to post)
Mawg
ok, just sanity checking :)
glob
+2  A: 

Use their ClassName to get an idea of wht they are when the Name property is empty.

François
you said first, by one minute, so you get the answer (sorry @Neftalí, but you did get +1 for your answer and twice for your comments ;-)Answer edited into question for better formatting.
Mawg