Author Archive: Marshall

Family Reunion

I found myself wanting to use Palatino Linotype as the font on a web site, to match most closely the font used on the client’s business cards and marketing materials.

Having recently found out that use of the “face” parameter of the HTML font tag is not necessarily considered a Good Thing, and knowing I will be relying heavily on CSS, where the “font-family” specification is used instead, that made me wonder what the rest of the font family members ought to be. Not everyone will have that Palatino font, after all.

I found this font resources page at Browser News, a site new to me, to be extremely useful. It charts similar fonts and gives an example based on the preference of Book Antiqua:

font-family:’Book Antiqua’, ‘Palatino Linotype’, Palatino, ‘Times New Roman’, TimesNR, Times, serif;

This is similar to what I would need in my CSS file, except to move Book Antiqua to the third position. Very nice.

VB Tips Collection

As I mentioned in the blog intro, XTreme had a history of publishing Visual Basic tips as part of the main site. I recently decided to revamp entirely, as the stale odor coming from the site overwhelmed me. Went down to a bare bones main page and left nothing linked from it until I could update further (that is, got around to updating further). Outside of search engines that still show them, if not ranked as highly as they once were, they aren’t linked anywhere. If you’ve moved along to VB.NET, some may no longer apply, but they work for some or all of the older versions of VB from 3.0 (for some of the basics) through 6.0. They are all linked in this post, just to get them out there again. Some may yet be reproduced entirely in posts here. Any new tips, Visual Basic or otherwise, will go here in the blog. The beauty of blogging software is that it’s so much easier to have a tip idea, write it, post it, correct it if needed, and receive feedback. But this isn’t a post on why blogging is a great tool. Here they are:

Fun With Textboxes – a basic tip with code for doing this and that in a VB textbox, with a picture of the result and a link to the VB5 project. Simple as it is, this has been one of the most popular tips. This is going to take forever if I describe each one, so forgive me if I’m terse for some of it.

Using Control Arrays To Your Advantage – another super simple tip that has gotten some of the highest traffic of all the VB tips. It can be easy to lose sight of the need for beginner info to be available if you are not one yourself. The next four are also quite popular, each one a database tip oriented toward VB6.

Example of Updating a Foxpro Table Via ODBC Direct Returning Recordcount with ADO

Closing, Reopening and Rebinding with DataEnvironment Example of Opening and Closing Recordset, then Opening a Different Table with the DataEnvironment

More database-related tips:

How to open an ODBC Direct Work Space and create an updatable recordset

Generating Output of Database Structure

Other tips and code samples:

Automation of MSN Messenger from VB Code – This is obsolete, but may provide ideas. Microsoft upgraded Messenger shortly after this was posted, changed the object model and broke compatibility with this code.

The next one was the result of a tip request from someone who’d seen the other tips on the site. We eventually figured out it was probably a homework assignment, and the guy hassled us for more and more help so that it would match more precisely the specs of his assignment. Idea for a tip, good. Harassment and being lazy, bad. Example of Determining Change Denominations in Visual

VB Add-In to Close All Code Windows

The next two were the result of the entire concept of finding factors and testing primes sort of “coming to me” in a grokkish rush. The tip for primes is the crudest, slowest method, and I challenge people to go from there and determine the better ways. Thus it shows what it shows, but may not be exactly what you want in a program that matters.

How to Determine the Factors of a Specified Number in Visual Basic Code

How to Determine Whether a Specified Number is Prime Visual Basic Code

VB6 Bug Using Printer.Scale to Print a Graph

How To: Launch Windows Control Panel Extensions Using VB

How to Determine Drive Size and Available Space Even On Huge Drives

Restart App At Windows Startup

Reading the lines of a multiline textbox into the an array

One way to determine whether a specific year is a leap year…

Use Object Browser and Class Wizard

This next one was online for a couple years before I discovered the original code had a minor bug that kept it from working exactly as intended. Oops… How to to tile a picture on a form

On instancing and naming

There you have it, the original collection of XTreme Computing VB tips from days gone by.

Microsoft: Root of All Evil

This is an interesting thread of comments at Wizbang. In my experience, a DVD drive from the supplier either comes with software, or you can pay $5 extra to get it. If I build a computer with DVD, I install that software, and the software goes along with the computer in case it has to be reinstalled. Anything else would be wrong on the part of… the computer maker! Not Microsoft.

An Oddity

I may edit this to flesh out the details later, like maybe camera model and exploit details. I’ve been encountering the strangest thing with pictures taken by a digital camera. Some of them, and it always seems to be the last ones on the memory stick in the particular batch, if they are e-mailed as-is get flagged by the web host’s mail scanning program as being infected with the recently uncovered JPEG exploit. Now, I know they aren’t affected by the exploit. The problem with the scans is that a slight internal defect in the JPEG file can mimic the way the exploit reads when the file is examined. This means the camera itself, or the storage medium it uses, is creating malformed JPEG files. Not good. It’s gotten old, not being able to e-mail the original graphics without the risk of having them purged.

What Is This Place?

Or more properly, what was that place. This was the intro post for XTremeBlog, which could almost be an intro post for Geek Practitioners Blog. I’ve redacted the e-mail address, but otherwise left it the same.

XTremeBlog is an idea I’ve had almost since I learned about blogging, and in some respects before that. It is a less formal, more frequently updated adjunct to the XTreme Computing site, for publication of technical information and opinions. On some level, it’s inspired by and an extension of our haphazard publication of Visual Basic tips dating back to the earliest days of the XTreme Computing site in 1997. You may see some of those ported over as blog posts, as the entire site is restructured and this becomes their natural home.

Blogs tend to grow in ways unexpected, but the content planned here ranges from elementary computer and software tips to geekfest programming discussions, from opinions on hardware and software to discussion of the tech industry, from management of technology to business more generally, from serious computer issues to geeky yet not really technical bits of fun.

To keep it varied and active, contributors who are not directly a part of XTreme Computing have kindly agreed to join us. They may choose to post a little about themselves by way of introduction, or not.

I hope you enjoy what we’re doing here. Suggestions are always welcome, by way of comments or by e-mailing [obsolete address].