I’m using winform and fb.net.
Can someone provide me with an example of how to create a buttons click event?
I have
dim but as windows.forms.button
but.name
but.text
but.location
etc.
but I how do I create the Click and the code behind it?
I’m using winform and fb.net. Can someone provide me with an example of how
Share
You can use:
In VB you can specify that a method handles a particular event for a particular control, if you’re not creating it on the fly – you only need
AddHandlerwhen you’re (say) dynamically populating a form with a set of buttons.Here’s a short but complete example:
EDIT: To close the form, the simplest way is to get the form of the originating control: