Geeks With Blogs
c pound I reject your reality and substitute my own! November 2005 Entries
Scale your Form and it's contents to fill the screen
This took me quite a bit of work in .Net 1 ... now it's easy. Bah! public static void ScaleToFillScreen(Form form){ form.FormBorderStyle = FormBorderStyle.None; //calculate the appropriate scale-factor SizeF sf = new SizeF(); sf.Width = (float)SystemInformation.Pr... / (float)form.Width; sf.Height = (float)SystemInformation.Pr... / (float)form.Height; //scale the form and the font form.Scale(sf); form.Font = new Font(form.Font.FontFamily, form.Font.SizeInPoints ......

Posted On Wednesday, November 30, 2005 11:22 AM

Ordering Code Construction Tasks
Jeremy Miller writes, The metaphor of software development as construction is common, but horribly wrong. Approaching software development as constructing a structure on top of a foundation, then adding the finishing trim can be a slow, painful path to project failure. Time and time again I’ve learned or observed that projects go much smoother when you build vertically instead of horizontally. What I mean by this is that you build a new system by creating a feature at a time with the entire ......

Posted On Tuesday, November 29, 2005 4:31 AM

Phone shots

I'm going to be posting some random shots from the awful camera in my phone. Check 'em out [here] or via the gallery link on the left.

Posted On Tuesday, November 22, 2005 10:44 AM

So I'm learning to snowboard...
... and it really is an addiction, I think. I mean, while I'm up on the mountain, I'm constantly falling and getting banged up. It's like being beaten with a wiffle-ball bat all day and then having some hot chocolate while you talk about how much fun it was. Then you drive back to Portland on a sheet of ice between an H2 with only one passenger and a Jetta hauling six people. Why do we do these things? It's just odd. Makes me glad I'm not a psychiatrist... I'd never have anything figured out! Buttercup... ......

Posted On Tuesday, November 22, 2005 10:38 AM

Single-Instance... the easy way
You want only one instance of your program to run at a time? Easy. If you are feeling particularly adventurous, I'm sure you could even figure out a simple way to switch to the currently running instance when someone tries to start a new one. using System;using System.Windows.Forms;using System.Diagnostics;namespace Sample.SingleInstance{ static class Program { [STAThread] static void Main() { //ensure that only one instance of this process can run at a time Process curProc = Process.GetCurrentProcess(); ......

Posted On Friday, November 18, 2005 7:50 AM

Don't worry, it only kills brain cells in rats...
So, having speakers at my desk isn't really useful because I share an office. We're headphone users around here. So, I just use one speaker - the one with the headphone jack in it - that I keep around as a volume control. Little did I know when I installed this thing that it would also be serving as my personal microwave radiation sensor. That's right. See, when my cell phone talks to the network every half hour or so. These mysterious communications produce enough EM radiation to induce noise in ......

Posted On Thursday, November 17, 2005 4:24 AM

Is Visual Studio 2005 riddled with holes?
Bah! Is it just me, or is Visual Studio 2005 really riddled with holes? I’m finding intermittent behavioral glitches, miscellaneous small errors, and occasional usability nightmares that just weren’t there in the beta. By the end of my first day with the new Studio, it had driven me to the very edge of sanity. To put it mildly, I was more than slightly frustrated. The culminating event was when it started switching keyboard focus to the error window for each keystroke in the code window. ......

Posted On Monday, November 14, 2005 8:20 AM

Copyright © Dan Koster | Powered by: GeeksWithBlogs.net | Join free