Create a dynamic control and AddHandle WITH Values/Brackets

Posted by Jacob Kofoed on Stack Overflow See other posts from Stack Overflow or by Jacob Kofoed
Published on 2010-03-07T22:26:24Z Indexed on 2010/03/07 23:11 UTC
Read the original article Hit count: 211

Hi, it seems that adding for example a button Dim myButton as New Button and then addHandler to mySub("lol", 255) is not possible.

Where mySub is Shared Sub MySub(byRef myString as string, myInteger as Integer)

So: addHandler myButton.click, addressOf mySub("lol", 255) - returns an error saying it does not work with parentheses or whatever.

I somehow see why this might not be possible, so I'm looking for a work-around on this problem.

Please help _jakeCake

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about visual-studio-2008