You have to do the collision test BEFORE actually moving the character - this is what the checking corners part of the code is all about; only if you can move in that direction (not blocked by wall), do you then move there - otherwise you move to the wall edge.

I'm having trouble following your code a bit, but it seems you are moving then testing for collisions?

procedure TBlurp.DoMove(TimeGap: Double);
begin
inherited;

{ X:=X+X_direction;
Y:=Y+Y_direction; }

{ if X <= 0 then X:=0;
if X > 640-Image.Width then X:=640-Image.Width;
if Y < 0 then Y:=0;
if Y > 480-Image.Height then Y:=480-Image.Height; }
Collision;
end;
And why are you moving 4 pixels each time? Doesn't this mean you are not going to get frame-independent movement in your game?
I would have thought you should move by your velocity (4 pixels?) times by the frame time (TimeGap)?

cheers,
Paul