Home All Groups Group Topic Archive Search About

Array of Buttons WithEvents

Author
21 May 2006 11:58 AM
Craig
In VB.net I am trying to make an array of dynamically generated buttons. I
can do that but I cant figure out how to get them to work "WithEvents."

Can someone tell me if and how this can be done?

Thanks,
Craig

Author
21 May 2006 12:52 PM
Cor Ligthert [MVP]
Craig,

It is a standard question.

It is in this simple sample on our (under reconstruction) website,

http://www.vb-tips.com/default.aspx?ID=e7510e67-92f3-49f6-b902-03abce36aa60

I hope this helps,

Cor

Show quoteHide quote
"Craig" <Cr***@discussions.microsoft.com> schreef in bericht
news:6C7F7294-D9BC-4C37-AED5-4D8E0297CB46@microsoft.com...
> In VB.net I am trying to make an array of dynamically generated buttons. I
> can do that but I cant figure out how to get them to work "WithEvents."
>
> Can someone tell me if and how this can be done?
>
> Thanks,
> Craig
Author
21 May 2006 1:16 PM
Michel Posseth [MCP]
to dynamicly created controls ,, you can programaticly add handlers for the
events you might want to catch

regards

Michel posseth

Show quoteHide quote
"Craig" <Cr***@discussions.microsoft.com> schreef in bericht
news:6C7F7294-D9BC-4C37-AED5-4D8E0297CB46@microsoft.com...
> In VB.net I am trying to make an array of dynamically generated buttons. I
> can do that but I cant figure out how to get them to work "WithEvents."
>
> Can someone tell me if and how this can be done?
>
> Thanks,
> Craig
Author
21 May 2006 9:23 PM
Herfried K. Wagner [MVP]
"Craig" <Cr***@discussions.microsoft.com> schrieb:
> In VB.net I am trying to make an array of dynamically generated buttons. I
> can do that but I cant figure out how to get them to work "WithEvents."
>
> Can someone tell me if and how this can be done?

F1 (Help) + 'AddHandler' statement.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>