I recently wanted to improve the boring context menu, a quick Google search found radial context menu (or pie menu). I couldn’t find a simple generic example so thought I would write one. Rather than write a menu I decided to write a generic radial panel that can be used to host any items, to … Continue reading
VMWare Connectivity Via VPN
When in the office my VMWare (VMWare Workstation 7.1) machines are configured to use a bridged connection as it’s faster than NAT, however when working from home via VPN the VMWare machines lose network connectivity. The solution is the following: In the VMWare Virtual Network Editor select the NAT network Untick ‘Connect a host virtual … Continue reading
RegEx On A Numerical Range
Regular Expressions on a numerical range can be tricky, I recently found this great site that will generate a RegEx for a supplied range. http://utilitymill.com/utility/Regex_For_Range Using the Verbose setting it can also demonstrate how it generated the expression which helps understand the output.
Enabling Code Coverage in VS2010
Enabling Code Coverage for the first time in Visual Studio 2010 isn’t obvious, once unit tests are completed and running the following steps are required. Select the testsettings file in Solution Items and open it. Select Data and Diagnostics Select Code Coverage and check the Enabled check box This enables a ‘Configure’ button, this is … Continue reading
Disappearing Toolstrips
Recently I added a toolstrip that wasnt placed directly onto the main form, at runtime the toolstrip wasnt there. Everything was set to visible and docked correctly but it wasnt showing. In the end it turned out that it was a bug/feature related to the fact the toolstrip was added inside a tab control, when … Continue reading
Configuring Registry Access
Installing system wide settings under HKEY_LOCAL_MACHINE can be a problem if the user running the application has to modify the registry settings and is only a limited user (non-admin). The following code shows how a particular registry key can be configured to allow access to other permission groups. //Create an object for the registry key … Continue reading
Remote Debugging
Debugging your code using Visual Studio is an easy and useful thing to do, until you have to do it remotely, then its not so obvious what is required. After a lot of trial and error working around network access and firewalls etc these are the steps I took to get remote debugging working (using … Continue reading
Rotating Ellipses
On a recent problem I had to draw lines of ellipses across a background image, some at 45 degrees. The Graphics.FillEllipse method draws an ellipse at the specified x,y. While researching into how to rotate these using the RotateAt method I ended up not only rotating each ellipse but also the whole line of ellipses … Continue reading
Multi Resolution icons with Gimp
When creating an icon (.ico) file for an app or file type it should include images for all resolutions/sizes, for example depending on what view Windows Explorer is set to (List up to Thumbnails) the required icon range from 16×16 to 64×64. Gimp makes it very easy to create these multi-res icon files, using the … Continue reading
ToolStrip Position Persistence
Until recently I had always added ToolStrips to a Form and set their docking property to Top, this was acceptable until I needed to move a ToolStrip. I then began using the ToolStripContainer which allows docking and the user to drag and drop the ToolStrips around the Form. This is well documented in MSDN however … Continue reading