Posts Categorized: Coding

C# UNC Path

0
UNC Path

For some odd reason, System.IO doesn’t include a method to get the UNC path for a file or directory. Even stranger, many code samples resort to using p/invoke in order to get that information. But then I came across this StackOverflow answer that explained a pure .NET way to do the same thing. I gave …

Adding An Existing Coded UI Test Map To A Project

0
Moving CUIT Maps

When you add a new coded ui test map to a project, Visual Studio conveniently organizes the accompanying .uitest, .cs, and .designer.cs files into a neat, unified bundle: So you’d THINK that’s what would happen when you copy an existing coded ui map from another project into a new one. But nooooo, Visual Studio just …

Coded UI: Failed To Perform Action On Blocked Control Exception

0
CSharpTesting

Today I encountered a very aggravating exception while playing back some coded ui tests. I had a grid control, with multiple rows. On one row, I could perform a mouse click. But on another row, I consistenly got a FailedToPerformActionOnBlockedControlException. Yet nothing was blocking the row.

Show Only The Year & Month With A DevExpress DateEdit

3
Show Only The Year And Month

One of the great disappointments of a programmer’s workday is creating a component only to discover shortly after finishing that someone else had already created the exact same component. Happened to me the other day. Literally 30 minutes after quietly putting together a DevExpress DateEdit that only displayed years and months, I hear a coworker …

Keyboard Hooking With C# – Redux

2
KeyboardHook Redux

Many moons ago, in preparation for a major rewrite to my QuickShift application, I wrote a low level keyboard hook implementation in C#. The original version of QuickShift employed global hotkeys to respond to keyboard input, however that mechanism proved to offer less-than-ideal performance: When the OS recognizes a hotkey combination, it responds by posting …

Favorite Coding Comics

0
Favorite Coding Comics

More than once I’ve found a comic about coding that made me LOL, only to forget where the hell I originally found it. So in order to avoid repeatedly having to hunt all over the internet to find my favorite comics, I’m just going to start posting them here as I find them.

Extracting Icons From Exe & Dll Files

2
Icon Extractor Screen Shot

There has been a time or two when I’ve wanted to use an icon from shell32.dll or imageres.dll for my own purposes. But for some reason I was under the impression it was a huge pain in the ass to extract them. Not the case, as it turns out.

(Balloon) ToolTip Misbehavior

0
I do what I want!

If you assign a balloon-style ToolTip to a control on a form, the balloon’s stem will correctly point to the assigned control during a mouseover event. If there’s room, the balloon will display above and slightly to the right of the assigned control… …if there isn’t room (because the control is too near a screen …