Author Archive

Visual Studio 11 ALL CAPS

The following is my response to the VS blog post about the design for all caps in top level menus: http://blogs.msdn.com/b/visualstudio/archive/2012/06/05/a-design-with-all-caps.aspx First off, why would you want to add *EMPHASIS* to menus when the design philosophy stated for the new look of VS was it didn’t distract from the content we are creating? Second, the […]

Click here to read more »

Rotate your Calculator on Windows Phone

Today I has having some discussions over the right roof pitch for a car port, so I grabbed my phone, rotated it and did some quick trigonometry.  Ten minutes later I tried to do the same and I could only see HEX and BIN, not Sin and Tan et al.  I’d forgotten it all depends […]

Click here to read more »

Visual Studio toolbar

The beta of Visual Studio 11 is causing a lot of feedback around the grey shade icons.  The use of colour or not has also brought to the forefront the UI for colour-blind people.  So I thought I’d post a picture of my toolbar, along with some links to see the page as seen by […]

Click here to read more »

windows 8 likes and dislikes

There’s a lot to like in windows 8 preview: it’s easy to see how windows 8 will be a hit on tablet devices; there’s massive synergy with windows phone; the built in windows live experience combined with your settings in the cloud, make it smooth to go from one device to another. But there’s other […]

Click here to read more »

VB Quark #7 : Optional Parameters and Dates

Hopefully you already know VB has full support for Optional parameters, both declaring them and calling them, but did you know you can use Dates as Optional parameters ?    Public Sub AddNewCustomer(customer As Customer,                               Optional dateAdded As Date = Nothing)       If dateAdded = Nothing Then dateAdded = Now   VB has had this support for Optional […]

Click here to read more »

Displaying Dates in VS 2010

From time to time there’s discussion about the way dates are displayed in the Visual Studio IDE for Visual Basic. Typically dates are shown using VB’s date literal syntax of #MM/dd/yyyy# which is the standard US format.  For people outside of the USA this can be confusing or ambiguous at times.  The good news is […]

Click here to read more »

VB Quark #6: Date operators

The DateTime structure in .NET includes custom operators for Date comparisons such as less than, greater than, equal and not equal; but did you know it also includes addition and subtraction operators ?  There’s two subtraction operators and one addition operator defined inside DateTime: date = date – timespan timespan = date – date date […]

Click here to read more »

VB Quark #5: C is for Char

Can you pick the problem with this code ? :       Dim currentChar As Char       For i = 0 To largenumber          currentChar = getChar(i)          If currentChar = "a" Then             count += 1          End If       Next   The answer of course is the literal “a” is of type string, not of type Char. […]

Click here to read more »

VB Quark #4: type literals

Do you know why you can’t write this code in VB:    Dim x = 123456789.0123456789 Answer: The IDE won’t let you If you try to write that code the IDE will truncate the number, giving :    Dim x = 123456789.01234567 To include all the decimal places you need to be using the Decimal […]

Click here to read more »

VB Quark #3: operator differences in VB/C#

Can you spot the problem with this code:    <Extension()>    Public Function ToColor(argb As UInteger) As Color       Return Color.FromArgb( _                       CType((argb & &HFF000000) >> &H18, Byte), _                       CType((argb & &HFF0000) >> &H10, Byte), _                       CType((argb & &HFF00) >> 8, Byte), _                       CType(argb & &HFF, Byte))    End Function   If you said it should […]

Click here to read more »

« Previous PageNext Page »