

Thoughts on software development in general, projects I'm working on, and anything else I feel like writing about.
I've been playing with Vista on my home system (which is also relatively new; I replaced my aging Compaq with a new Dell desktop a couple of months ago) for about a month and like it a lot (the subject of another posting).
I'm very anal about setting up a new system (those of you who know me would suggest I'm anal about everything), so I spent a couple of hours this morning documenting in great detail exactly how I'm going to set up the new system, with special attention to what comes off my old system and onto my new one. It isn't as easy as you think; obviously, I can simply move files from one to the other, but what about all of the little settings you've configured over the years, like:
and a hundred others. Fortunately, I've been mostly documenting system customization as I go, so I just needed to update the document and go over the various folders on my old system to decide what to move, what to throw away, and what to archive and not move.
I'm also breaking Rick Schummer's law (which I adopted years ago) of never installing or otherwise changing your system a month before a conference. I'm planning on taking the new laptop to OzFox, which is only a couple of weeks away, and you can't get much more "changish" than to replace the whole freakin' system. Normally, I wouldn't do anything so foolhardy, but Rick and I are doing the keynote, part of which is to show the very cool Vista Toolkit Craig Boyd has been working on for Sedna, and it's kind of hard to show it without Vista. However, I do have a couple of ideas to make this work:
After I finished the documentation, I started the actual configuration stuff. I had some trouble connecting to our domain until I remembered about that #%$^$ Norton Internet Security; disabling it took care of that. I then did all of the other settings stuff and started on the file transfer.
I'm copying files from the old one (which I'm typing this on) to the new one right now; the progress meter says it'll take another 5 hours (yikes, there are 73,063 files to copy), so I guess it's Miller time a little early today. Tomorrow, the really boring job starts: installing all the applications I need. I don't have 100 apps like Rick -- in fact, I have exactly 45 (thus proving the anal attribute) -- but it'll still take a couple of days because some of them, including SQL Server, Office, and Visual Studio, are real heavyweights.
No pain, no gain -- I'm really looking forward to getting this done so I can play with my new toy.
lparameters tcFileName, ;Thanks to Craig Boyd, Bo Durban, and Cesar for all the work they've done on this incredible library!
tnHeight, ;
tnWidth, ;
tnColor1, ;
tnColor2
local lnColor1, ;
lnColor2, ;
lnMode, ;
lnFormat, ;
loSystem, ;
lcExt, ;
loBitmap, ;
loRect, ;
loGfx, ;
loGradBrush
* Ensure the parameters were passed.
if vartype(tcFileName) <> 'C' or empty(tcFileName) or ;
vartype(tnHeight) <> 'N' or vartype(tnWidth) <> 'N'
error 11
return .F.
endif vartype(tcFileName) <> 'C' ...
* If colors weren't passed, prompt for them.
if pcount() < 4
lnColor2 = getcolor(rgb( 0, 128, 255))
lnColor1 = getcolor(rgb(255, 255, 255))
else
lnColor1 = tnColor1
lnColor2 = tnColor2
endif pcount() < 4
* This assumes a horizontal gradient. Set lnMode to a different
* value for other types.
lnMode = 0
* Create a GDIPlusX System object.
loSystem = newobject('xfcSystem', 'System.vcx')
with loSystem.Drawing
* Determine the image type from the file extension.
lcExt = upper(justext(tcFileName))
do case
case lcExt = 'PNG'
lnFormat = .Imaging.ImageFormat.Png
case lcExt = 'BMP'
lnFormat = .Imaging.ImageFormat.Bmp
case lcExt = 'GIF'
lnFormat = .Imaging.ImageFormat.Gif
case inlist(lcExt, 'JPG', 'JPEG')
lnFormat = .Imaging.ImageFormat.Jpeg
case lcExt = 'ICO'
lnFormat = .Imaging.ImageFormat.Icon
case inlist(lcExt, 'TIF', 'TIFF')
lnFormat = .Imaging.ImageFormat.Tiff
case lcExt = 'WMF'
lnFormat = .Imaging.ImageFormat.Wmf
otherwise
error 11
return .F.
endcase
* Create a bitmap and a rectangle of the desired size.
loBitmap = .Bitmap.New(tnWidth, tnHeight)
loRect = .Rectangle.New(0, 0, tnWidth, tnHeight)
* Create a graphics object.
loGfx = .Graphics.FromImage(loBitmap)
loGfx.Clear(.Color.White)
* Create a linear gradient brush.
loGradBrush = .Drawing2D.LinearGradientBrush.New(loRect, ;
.Color.FromRgb(lnColor1), .Color.FromRgb(lnColor2), lnMode)
* Fill the rectangle with the gradient brush.
loGfx.FillRectangle(loGradBrush, loRect)
* Save the image to the specified file.
loBitmap.Save(tcFileName, lnFormat)
endwith
return