For some reason, I've never had much luck getting DirectX 9 to work properly with VB.NET, so I can't modify the code or compile, but I did run the .exe you provided and this is what I got.
I looks like it works to me. However, I did notice that your ray isn't very long. Try drawing side views of the triangle and ray as well,
e.Graphics.DrawLine(New Pen(Color.Red), mobjPts(0).X, mobjPts(0).Y, mobjPts(1).X, mobjPts(1).Y)
e.Graphics.DrawLine(New Pen(Color.Red), mobjPts(1).X, mobjPts(1).Y, mobjPts(2).X, mobjPts(2).Y)
e.Graphics.DrawLine(New Pen(Color.Red), mobjPts(2).X, mobjPts(2).Y, mobjPts(0).X, mobjPts(0).Y)
e.Graphics.DrawLine(New Pen(Me.ForeColor), RayPos.X, RayPos.Y, RayDir.X, RayDir.Y)
e.Graphics.DrawLine(New Pen(Color.Green), mobjPts(0).X, mobjPts(0).Z, mobjPts(1).X, mobjPts(1).Z)
e.Graphics.DrawLine(New Pen(Color.Green), mobjPts(1).X, mobjPts(1).Z, mobjPts(2).X, mobjPts(2).Z)
e.Graphics.DrawLine(New Pen(Color.Green), mobjPts(2).X, mobjPts(2).Z, mobjPts(0).X, mobjPts(0).Z)
e.Graphics.DrawLine(New Pen(Me.Cyan), RayPos.X, RayPos.Z, RayDir.X, RayDir.Z)
e.Graphics.DrawLine(New Pen(Color.Blue), mobjPts(0).Y, mobjPts(0).Z, mobjPts(1).Y, mobjPts(1).Z)
e.Graphics.DrawLine(New Pen(Color.Blue), mobjPts(1).Y, mobjPts(1).Z, mobjPts(2).Y, mobjPts(2).Z)
e.Graphics.DrawLine(New Pen(Color.Blue), mobjPts(2).Y, mobjPts(2).Z, mobjPts(0).Y, mobjPts(0).Z)
e.Graphics.DrawLine(New Pen(Me.Magenta), RayPos.Y, RayPos.Z, RayDir.Y, RayDir.Z)