If you can't understand the code presented we are unlikely to be able to help you much in a Quick Answers Forum!
However - your first link - you can put the code wherever you like. A button click event would be appropriate, amongst other options.
The missing reference on your 2nd link is likely to be the byteScout Image to Video library.
Finally, on the third link to the CodeProject article - normally I would suggest using the comments forum at the bottom of that article, but the author does not seem to be responding to comments. However, I
do Quote:
see the point in spending time on something where the end product is broken
- it's a good way to learn and happens to be a scenario that most developers face on a regular basis.
There are
other articles[
^] on CodeProject that you may find useful