Haschi, I've tried everything I know to make your code work, but cannot.
It seems that an ImageButton created in the Designer will respond normally to Click, ButtonUp, and ButtonDown events.
An ImageButton created dynamically can be made to respond to Click events, but not ButtonUp or ButtonDown events.
Perhaps you and I are using the wrong parameter for the event in AddEvent?
Code:
controlName = "ib" & ( j+i*3 )
AddEvent( controlName, ButtonDown, "fni_ButtonDown" )
AddEvent( controlName, ButtonUp, "fni_ButtonUp" )
AddEvent( controlName, Click, "fni_Click" )
Anyone see anything wrong with this?
Gary