Hi Tom,

   > My code is part of the OnShow event of the form.

In that case the Sender will never be a TSpeedButton, so your
typecast (Sender as TSpeedButton) won't work.

Also TSpeedButton is a TGraphicControl, not a TWinControl.

You need to cycle through the components on the form and then do

if Component is TSpeedButton

    if TSpeedButton(Component).Name = 

regards,

Martin.

Reply via email to