What Tridion version do you use ?In Tridion 2013 there are PowerShell scripts for this. Tridion 7 (2011) SP1 and higher has CoreService method PurgeQueue for purging specific queue (not only publish) - so you can use your application with next code :
using (var client = new SessionAwareCoreServiceClient())
{
client.PurgeQueue(1);
}
(1 is number of publish queue. All values you can find in the table dbo.QUEUES)
Edited... You can try to use Tom.Net for this as well - this was added in 2009 (honestly don't know - is it in your release verion or not).
using (Session session = new Session(@"Your User"))
{
QueuingEngine engine = new QueuingEngine();
engine.PurgeQueue(1);
}
For using QueuingEngine you must make reference to Tridion.ContentManager.Queueing