Filed under C#

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

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

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

Non-standard Toolstrip Controls

I recently had to add a .Net toolstrip I implemented a few years ago to a ToolStripContainer so it could be moved and docked, the ToolStrip had a horizontal scrollbar “placed” on it, i.e. a normal scrollbar control that has a fixed position on a certain place on the ToolStrip. This was done because the … Continue reading