Sunday, November 30, 2008

VB.NET 2008 Printing

Tired of all those useless cunts attempting to give really crappy advice?

Here's the real deal.

Drag and drop a PrinterDocument onto your form.

Set a button.

Button click does PrinterDocument1.Print()

Create a handler for this, ie override .Print().

Use System.Drawing.Printing.PrintPageEventArgs for 'e' in the argument list, and set to 'Handles PrinterDocument1.PrintPage.

Then, in the body of this method, say e.Graphics.DrawString(fill this in) for text,

or for a picture, e.Graphics.DrawImage(fill this in)

It really is that simple.

Five lines, and there are all these uselss dickheads filling the www with rubbish going on from reference to reference and site to site, sometimes pages long, telling nobody anything.

It's an embarrassment.

Saturday, November 29, 2008

Windoze Bloody Windoze

So, I thought I'd do a little Windows programming.

The first time I switched on, ten minutes and I'd had some rubbish suggestions about 'unused' icons. Then the system tried to update half a dozen things at the same time and died.

I pulled the plug.

Attempt number two, and I opened Program Manager sztraight away to head them off at the pass.

No upgrades this time, just an unasked-for security scan that killed everything, including Program Manager. Complete with a 'cancel' button that didn't.

Pull the power cord out again.

This is the third attempt.

So far I've been trying to boot up for half an hour and I haven't written a single line of code. 

Windows?

Pathetic.

Friday, November 28, 2008

The Experiment

On Tuesday I received my new DVD.

It is a Region 1 NTSC copy of Seven Days In May, which is about the best film I know of.

Try as I might, I couldn't get it to play on any of my computers; I tried the windows hacks with no success.

Linux actually issued a disclaimer because what I was trying to do was illegal (copy and convert a write-protected movie).

So I caved and went to Amazon again, where I picked up a snazzy multi-region DVD player for £30.

Obviously made in the Great Chinese Slave Hell of the East, but it arrived today, three days later, and it works.

I sat and watched the almost unobtainable 'Seven Days In May', for two hours straight.

Superb.

For those of you not in the know, it stars Burt, Ava and Kirk in a story about a military coup d'etat in the USA against an unpopular pacific president.

Awesome.

Gripping from the first minute to the last.

Thursday, November 27, 2008

I Shot The Deputy-But I Didn't Mean To

This article is interesting; the Sheriff's Deputy who was invalided out of the NYPD, is now also a millionaire.

Would you take the bullet?

Tuesday, November 25, 2008

A Word To The Wise, Dudes.

Nero is shite.

For god's sake, don't install it.

Saturday, November 22, 2008

Wild!

This guy is really out there.
I wish him the very best of luck. He's a real hero.

Saturday, November 15, 2008

Truth.

A government big enough to give you everything you want is strong enough to take everything you have - Thomas Jefferson

OpenCV modifications

And now a break for business.
Dont bother with this post unless you are a nerd, or a developer.
OpenCV is a vision library that supplies source code.
It works fine out of the box.
The libraries are available in two flavours; VS6 and VS8.
Both build readily.
However beware!
The VS8 version will upgrade to and build in VS9, but if you make any changes to the open source code, it will require 'omp.h', a header file only available to VS2008 Professional, which is many hundreds if not thousands of pounds.
Fear not.
If you have VC++ 6, you can build your changes in old-fashioned style, and it will integrate with VS9-produced applications(unmanaged), so that you can use VS6 to get round the (massive) financial hit and modify the open source OpenCV code.
Happy!

Wednesday, November 12, 2008

Forget The BBC.

Superb comedy from Chuck Lorre et al;
'Big Bang Theory'.
I saw the last in the current series tonight.
I had heard it was not going to be renewed,
but apparently it is a current series.
Pleased about that.
Not so pleasing- blogger doesn't supply a full 'compose' window to Opera on Linux anymore.

Monday, November 10, 2008

About Time.

The BBC is finally living up to its remit.
It is showing the story of the refugees from Tibet that were shot dead, murdered as they tramped in the snow towards freedom.
The murders were filmed by an international group of climbers.
The cameraman was Rumanian!
When he got home, he gave the films to his contacts in the Rumanian Media, who immediately broadcast them.
The BBC also broadcast them, in the programme 'Murder In The Snow'.

Finally, a little bit of the truth about Red China.

Thursday, November 06, 2008

Gore Vidal?

Ha ha ha ha ha ha ha ha!

Loony!

Sunday, November 02, 2008

Americanism.

Americanism was the simplest religion ever conceived.

Its bible, the Constitution, was a few sheets long, and essentially boiled down to 'go and be happy'.

There was no god.

There was no governing class.

Anyway, that was Americanism. Let's hope they have a fundamentalist resurgence.

Correction.

It is open source.

It is assholes.

But it is the Banshee music player, not Opera.

Banshee, if you remember, was the music player written in that god-awful C# open source clone, Mono, that ate memory and hung the system after a day or two.

This time it failed to go away when asked to, and left a zombie behind that slayed the sound resources Opera needed.

Now I will uninstall Zombie, sorry Banshee, since it seems to be really really, well, *crap*.

Rhythmbox takes two goes to start, but Rhythmbox rules.

You Gotta Love these 'Open Sauce' Assholes.

So they bring out a version of Opera, 9.60, that WORKS!
WONDERFUL!
Then a week later, 9.61.
Then, this week, 9.62.
And guess what?
Yes!
The fucking idiots have BROKEN it again!
Well done!
You half wits.