port from vb6 to vb.net