July 2015 archive

Distinguish Between Touch/Pen and Mouse Input in WinForms

In WinForms, mouse events are raised regardless of the original source of the mouse. If you click a button with the stylus for instance, you’d still get the MouseClick event. This MSDN page explains how to distinguish between the sources of the event. To make the long story short, you’d have to place an API call …

Continue reading

Git: Merge Specific Commit from Another Branch to Main Branch

Let’s say that in your git repository, you have a master branch and an experimental branch. You’ve fixed a bug on file A on the experimental branch and you would like to commit that fix to the master branch. This is possible using the git cherry-pick command. First, switch to the experimental branch and execute git log. Take …

Continue reading