November 2005 Entries
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...
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...
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
... 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...
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();...
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...
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....