Patrick Steele's .NET Blog
Implements ICodeWithDotNet
-
A clean fade out
Someone at our local .NET user group asked me about a problem he was having closing a form. He was using a for/next loop to gradually reduce the Opacity property until it hit zero and then he could close his app. He was using Thread.Sleep() inside the loop to control its speed.
-
USB ports and .NET
I've seen the question a number of times in the newsgroups: Can you access the USB ports with .NET? Usually it's "No", but digging around tonight I found that developer of SharpDevelop has created a .NET Library for USB port access called #usblib (SharpUSBLib).
-
Josh Holmes, Microsoft MVP!
Our local user group (G.A.N.G.) VP is now an MVP! Congratulations to Josh Holmes for being awarded MVP status in -- Visual C#? Hey, what's up with that Josh? :)
-
Most recently subscribed to.
I just found Raymond Lewallen's blog and I like it! As an example, he's got a couple of neat posts this month:
-
VSM arrives in "style"?
The latest issue of Visual Studio Magazine arrived in a special envelope from the post office. A pre-printed message on the envelope apologized for the delay in getting the item to me. It had encountered some "problems" en route to me. I opened the enveloped and discovered a large chunk of the magazine missing:
-
What's "/u" for?
Got this one from a colleague today:
-
VB.NET Shares a little too much
A thread today on using the System.Diagnostics.Process class highlights one of the more confusing aspects of VB.NET (or VS.NET depending on how you want to look at it). Intelliense will list Shared (static in C#) members when showing members on an instance variable. Take the following sample code:
-
Exposing Events in User Controls hosted in Internet Explorer
NOTE: This is an old blog post that I obviously never posted. I wanted to send a link to this article to someone and when searching through my archives I realized I never posted it! Enjoy.
-
Do you "organize" your 'using' statements?
More and more I find myself "grouping" my using statements ("Imports" in VB.NET). For example, I now try and do Microsoft framework namespaces first, then namespaces for DLL's developed at my employer and finally third party namespaces. Something like this:
-
Timing is everything
I was doing some code reviews today. The particular project I was reviewing was doing COM-interop so one of the things I looked for was to make sure that any COM objects created were wrapped in a try/catch/finally block and those objects were properly released with Marshal.ReleaseComObject in the finally block.