Monday 25 August 2008

Apply Computer Settings slow

I have had a login problem for a while. Whenever I booted up and logged in I would get to the "Apply Computer settings" message and it would sit for ages.

Well I found a solution last week, refresh your DHCP lease using

ipconfig /registerdns

in a command prompt. This worked for me and now my boot up time is minutes shorter.

Thursday 14 August 2008

Transparent TrackBar Windows Forms

I discovered today that trackbars in windows forms .net don't support transparency, now why would i want transparency, so that when you put it on a tab control it looks the same as all the other controls. I could have set the tabPage UseVisualStyleBackColor to false but then i get the same old grey controls.

so I searched around today for a transparent trackbar and I found 2.

The first is just a dll from Mick Doherty, with no code, so im a little hesitant to use it in case it breaks

The second was originally on Matt Bird's web site but has now been moved to codeplex TransparentTrackBar as the original link was taken down.

Thanks to Matt Bird for allowing this code to be open sourced.

I hope people find them useful.

Sunday 3 August 2008

Microsoft Stylecop

I ran into Microsoft StyleCop the other day. While I disagree with some of its style conventions, I agree with most of them. I can forsee see the day when it will be the default for nearly all C# applications.

To this end I hope JetBrains update ReSharper to be able to auto format to the Microsoft standard. Much of it is boilerplate but it would be really good.

There is a JetBrains enhancement request for this so feel free to add your vote if you are a ReSharper user. (Search for (RSRP-71904) StyleCop / Source Analysis reformatting if the link doesn't work)

StyleCop itself will be adding the ability to auto format code to their coding conventions (http://blogs.msdn.com/sourceanalysis/) and Jason Allor responded to me via email that they will be publishing their style rules in a document soon.