Posts

Showing posts from 2005

You liquidated her, eh? Very resourceful...

Long time, no blog. What can I say? I've been to the "Happiest Place On Earth"

But, now that I'm back, here's a neat little trick that I learned about how to embed and use graphic resources in a Visual Studio .NET application. For my example, I'm assuming that I have an icon file named "Test.ico".
Using visual studio or another tool, you can create a bitmap, jpeg, gif, or Icon. Put that file in the same directory as the rest of your project. Then Add the file to the project (Add Existing Item...) and add the file. Change the Build Action of the file to be "Embedded Resource"When you want to use the file, simply add the following code (or something similar):
Dim _icon as Icon = New Icon(Me.GetType(),"Test.ico")
Now you have a real icon that can be used for any number of things (application icon, status icon, etc.)

Am I Blue?

Image
Just a quickie post with a picture for those of you who may not know what I look like. Actually, you still won't know what I look like because this was my Halloween 2005 costume. A "Blue Man"

This whole effect was accomplished using simple make-up items from "The Costume Shop" in Garden City, Idaho.
I prepped myself with a good shave and a haircutThe skin-head wig was prepared using Caster Sealer. This helped it to have a less streaky appearance than it would have had otherwise. This is bascally castor oil, but it makes the latex skin less slippery.I positioned the skin-head over my hair and ears and then glued it in place with stage glue. We applied Cobolt Blue Greasepaint to my entire head and neck.I'm wearing a black turtleneck shirt with black pants, shoes and socks.The entire process took about an hour.Total cost: $20

Loss of Focus

It would appear that the venerable GDI routine "DrawFocusRect" and the MFC routine "DrawFocusRectangle" have lost a bit of functionality in their .net contemporary function "DrawFocusRectangle".
In the old world, you could draw the focus rectangle once to draw it, and then again to erase it because it uses an XOR pen to draw the familiar dashed box. Under the .net version "ControlPaint.DrawFocusRectangle", it doesn't use an XOR pen, so you can't erase it with another call.
There is a function called "DrawReversableFrame", that will erase itself, but it doesn't take a parameter containing the graphics object, so you have to manually transform the coordinates to screen coordinates.
A change like this is really not very understandable because it means that somebody had to create a function from scratch rather than wrapping the windows functions (as they did most of the time).

Brent: Programmer. Gamer. Cheapskate. All around good guy.

So... not being one that can leave a sore spot alone, when Brent Brown sent me an email Brent his "preferred" blog link so that I could update the link I had created to Stubenville, I naturally couldn't just update my previous blog entry. I needed to take the opportunity to pour lemon juice, salt, and vinegar into the wound until it became a pulp of agonized flesh. It may be because that's the way I am, but it may also be because Brent really needs this kind of opposition in his life. After all, he has a wonderful wife and cute kids, but as far as I can see, nobody that really gives him the harassing that he needs to keep his life in balance. That's where I come in.
I don't know what the big deal is... after all, I liked the Stubenville (not Stupid-ville, that's a whole other wound that needs opening from time to time) thread. However, since he isn't there any more, I suppose that it has a limited shelf life. So, if anyone actualy reads my blog, you sh…

(Tool)Band Aid

So, I recently completed writing a Desk band for windows. What is a desk band, you ask? Well, your windows start bar is the home for several desk band objects. These are basically COM objects that support a bunch of interfaces and register themselves in appropriate places so that windows knows to load them.

In short, you register your windows class and it gets put in the toolbar. Nearly the same code can work in multiple places in IE, Explorer, and in the Start Bar. So, I learned a few lessons:
It is far easier to do your initial development so the band will work in the IE toolbar than in the start bar. This lets just run the COM object (and automatically start IE) rather than manually starting up the desk band, and attaching to the Explorer process. When you get most of what you need done, you can test it in the Start bar. A conditional compilation switch in your code will make sure that you don't accidentally register the release version of your desk band object to run in IE (if y…

Windows XP ala' Burger King (have it your way)

I got my Shuttle SN25P XPC on Monday from NewEgg and immediately put it together. The components that I had delivered with it are:


AMD Athlon X2 64 3800+ processor2 GB Crucial pc-3200 memory (2x 1GB)Samsung SATA2 250 GB driveGigabyte Nvidia GeForce 6600GT 128 MB video cardThen I spent most of the evening installing Windows XP, service packs, and all kinds of hot fixes. Not to mention the drivers needed by my machine (like everything!) Well, to make a long story short, the UN-service packed version of XP doesn't recognize drives over 130 GB or so, so it formatted the drive smaller than it should have been. So now I'm faced with resizing the drive with partition magic or something similar.I could have saved myself a lot of time using the following utilities and programs:Unattended XP CDnLite - Tool for slipstreaming and customizing windows installationsRyanVM's Windows XP Post-SP2 Update Pack - latest hotfixes all together in one install or separatelyDriverPacks - up-to date …

Jack of all trades...

I guess if Brent can do it, so can I. After much coaxing and goading, I am going to keep a blog of cool stuff that I figured out. This is not so much a vanity site, I really don't believe that anyone will read what I have to say as it is my anti-altzheimers mechanism of choice.
Or, to put it another way...

"Cool. Why don't you put that in a blog so that when I ask you how you did it a year from now you won't just give me a blank expression" - Brent
Oh, yea, and Scott has said almost the same thing from time to time.

Now, for those of you who don't know me... What are you doing here? You must really be bored.