Sunday, February 27, 2005

Doing a couple of cool things...

This is just a quick one about a couple of cool things I discovered not so long ago. They're nothing really new or anything, I just thought they were kinda fun and useful to know.

1) ControlPaint.DrawReversibleLine
If you're a DNR listener you'll have heard Carl and Mark Miller talking about this method. It does a very simple, but profoundly groovly little thing - it draws one of those lines where the colours are the negatives of whatever's on screen beneath it (are they called XOR lines?). It's a very cool thing. I've never used it in any proper application (well, as proper as mine get, anyway!).

2) Embedding Windows Forms Controls in HTML
I was vaguely aware that this could be done. But only vaguely, and never really seen it. However, thanks to the fine fine chaps at MSDN UK, I have. I even get what's going on, as well. Weird. The only bit that's a bugger to remember (although I'm sure it'll come in time) is the sntax for embedding an object. It looks like this:
<Object ID="myobject" classid="http:FullPathToAssembly/FileName.dll#FullyQualified.ClassName" />

And that's it. All done. I just never saw it before. I think I'm going to have a bit of a play with this and see what I can get done putting various controls in web form apps. I think it's got potential to be quite cool. Well, I know it's got potential to be very cool, but it's something I'm going to have to have a bit of a play with.

Oh yeah, and it looks like Firefox doesn't support it.

Just wanted to share.

No comments: