PCW examples and resources

This is where to find example code from Web Development hands on in Personal Computer World (a UK magazine).

You are welcome to contact me:

visual(at)pcw.co.uk - replace (at) with the @ symbol.

Tim Anderson's tech Blog

Back to ITWriting.com home page.

Discuss Web Development in the Phorum forum

Database programming with VB

Here is the code for the simple database application in the September 2008 issue:

Simple VB Database app

This is an app with no databinding or dataset.

Here is the code for the databound version described in the October 2008 issue:

Simple VB Database app with databinding

A simple VB web monitor

Here is the code for the web monitor described in the August 2008 issue:

VB Web Monitor sample

It works as-is but there are many possible enhancements.

Decompile VB3 applications

Here is the decompiler for VB3 which I described in the May 2008 issue:

VB3 Decompiler Demo

This is a working demo with some restrictions. See the readme for more information.

Search files with a background thread

This example from the March issue shows how to use the .NET BackgroundWorker in an application that searches for files. Here is the VB code, which requires .NET 2.0 (Visual Studio 2005):


The interesting point here is that I discovered a problem with the BackgroundWorker's ProgressChanged event. When I used this in the search application, I got a frozen UI, along with exceptions including the COM ContextSwitchDeadlock error. The problem seems to be in the way BackgroundWorker's ReportProgress is implemented. It should wait for the ProgressChanged event handlers to complete before returning. Easily fixed (I used a Semaphore), but I am surprised how easy it is to trip up with BackgroundWorker.

Email any queries to visual(at)pcw.co.uk

Download simple VB.NET Threading Example

Here is the example code from the July 2005 PCW. Note I've made a few enhancements to the code in the magazine. You can now show the time taken, and disable the progress thermometer to see how much time it costs.

A Simple AJAX example

I set out to present a very simple example of Asynchronous Javascript and XML, to show the concept. Here is the demo:


Notice how you get a wait message within the page while the server-side code is processing (there's a deliberate pause to make the demo effective). Then the results display without causing the whole page to refresh. Works on Firefox and Safari as well as IE (these are all the browsers I have tested).

You can also download the code.

Email any queries to visual(at)pcw.co.uk

Download simple VB.NET Threading Example

Here is the example code from the July 2005 PCW. Note I've made a few enhancements to the code in the magazine. You can now show the time taken, and disable the progress thermometer to see how much time it costs.

Secure log-in with ASP.NET

Here's an example of secure log-in. And here's the code.

Publish an RSS feed with ASP.NET

This example shows how to generate RSS from a simple ASP.NET application. Accompanies Hands On in August 2004 PCW. Code is here. A feed using this code is here.

Windows Media Player Plug-in

A simple example showing how to create a "Now playing" plug-in for Windows Media Player 9. All the code is here.

A VB.Net database example

Here's a simple database application, complete with a web variant, to accompany the Hands On in March 2004 PCW.

Why Tablet PC?

The Tablet PC hasn't exactly taken off so far, but at least it addresses the weak point of portable computing. The keyboard. Read more here.

Move the mouse in Visual Basic

This example from the November 2003 PCW shows how to move the mouse pointer programmatically. There are two downloads, one for VB6, one for VBA in Word.

Move the Mouse - VB6

Move the Mouse - Word

Eclipse Java/Swing tutorial

See here for the example project including installation instructions.

Investigating .Net

A whistlestop tour, combining history, opinion, technical introduction, and a few predictions. Read it here.

The HTMLEditor

A powerful .Net control that supports display and edit of HTML text. Also demonstrates advanced COM interop. Download it here

OwnerDraw Demo (VB.Net)

You can download the example from the December 2002 issue here.

The .Net Framework on Mac OS X. Sort of.

It runs. Well, walks. Read about it here.

Borland futures, Eclipse, Java and .Net

Some new thoughts - wild, or not? You tell me.

Macromedia MX explained

Interview with Jeremy Allaire, Macromedia's Chief Technology Officer, explaining the future of Flash, Dreamweaver, ColdFusion and more. Click here to read.

Dynamic text in fancy fonts

This ASP.Net script lists fonts available on the web server, and allows you to preview each one. Click here to see. Full code is coming soon. Note: this link is to a free Brinkster account which isn't super-reliable.

Create a site for registered users

This Hands On PHP script lets you create a site where users must register to log-on: Members only. Full code is available.

Vote in the online poll

As featured in Hands On: a PHP script for data-driven online polls. Try it now: Vote in the Hands On poll. Full code is here.

Java HTML Editor

This code demonstrates how to create a Java HTML browser and editor: Download it here.

XML parsing example

This example has been withdrawn for copyright reasons.


Active Server Pages

Link to ASP examples, including the Content Linking (Great CDs) example.


Comment example

Using PHP and a slightly modified CommentIT script, I've added the facility to comment on some web pages in this site. Here is an example (it's an article on Visual Basic and Kylix).


Menu example

Here are some ways you can use JavaScript to create drop-down menus that link to other pages. Find it here.


Hypertext transfer protocol

Here is RFC2616, which defines the HTTP specification. This is in plain text format. It is quite large so you might prefer to right-click and Save As rather than reading it online.


Version Information example

This is the example Visual Basic 6 project for extracting version information from a file: VerInfo.zip


Table example

Here is the table example from the Head to Head in the October 1999 issue.


Rollover code

For the rollover code, you might as well look at the OnlyConnect home page. Note this code is more convoluted than I would like, thanks to attempting to support both Internet Explorer and Netscape Navigator. This page demonstrates some simple DHTML animation as well.