View Single Post
  #4 (permalink)  
Old 02-29-2008, 10:51 PM
willisgt's Avatar
willisgt willisgt is offline
Senior Member
 
Join Date: Aug 2007
Location: Nacogdoches, Texas USA
Posts: 164
Default

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
__________________
PC: Windows XP Pro SP3 / Basic4PPC v6.5
PPC: HTC 8925 (AT&T Tilt) / Windows Mobile 6
Reply With Quote