Tag Archives: controls

Assign Event to Multiple Controls, Windows forms and C#

Lets say that you want the same event to be triggered by multiple controls. You don’t want to have to rewrite the code for all the controls. Here we’re going to use four buttons with one shared event that shows … Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment

Adding Controls to Windows Form at Runtime C#

This is a basic introduction on how to add a control to a windows form using C#. In this example we will add a button to a form with an On Click event. Firstly let’s add the button with the … Continue reading

Posted in Programming | Tagged , , , , , , | Leave a comment

Resizing Controls with Form Visual Studio C# VB.net

I can remember having to write the code to resize control in forms. These days Microsoft have made it much easier with the Anchor property. When you put a control on a form, e.g. a listbox, you’ll find that by … Continue reading

Posted in Programming | Tagged , , , , , | Leave a comment