AddressOf with parameter

后端 未结 8 665
误落风尘
误落风尘 2021-01-07 23:33

One way or another I need to link groupID (and one other integer) to the button I am dynamically adding.. any ideas?

What I can do;

AddHandler mybutt         


        
8条回答
  •  春和景丽
    2021-01-08 00:35

    Use the Tag property of the button.

    Button1.Tag = someObject
    

    AddressOf gets the address of a method, and thus you cannot pass parameters to it.

提交回复
热议问题