How can you create buttons and add them to a form when your application is running? I need to do that in my Program Manager when the user drags files out of the Windows File Explorer and onto the form. What’s more, each button needs a label and an icon. And it needs to be able to launch the associated program or document when it is clicked. In other words, it needs to have a Click event-handler that is created when the button itself is created.
Sounds like hard work? Well, no, it isn’t really. As this video explains.
To understand file launching, I’d also recommend that you watch my lessons on programming a Disk Browser – which you can find here: • How to Program A Disk Browser in C#
For more C# Programming Projects, see this Playlist: • C# Programming Projects
Huw Collingbourne is author of numerous books on programming C, C#, Java, Ruby, Delphi and Object Pascal, pointers, recursion and programming adventure games. Find them all on Amazon.
To learn C# quickly, Huw’s book, available in paperback or for Kindle, is the perfect complement to these YouTube lessons.
The Little Book Of C# Programming (Amazon US): https://amzn.to/2JWDI0o
The Little Book Of C# Programming (Amazon UK): https://amzn.to/2YaCPtS
Keep in Touch
==============================
Subscribe to the Code With Huw YouTube channel: https://www.youtube.com/CodeWithHuw?s...
Code With Huw on Facebook:
/ codewithhuw