Just remove 'PtrSafe' in VB6; that's the only difference here.

You'd put it somewhere in the UserControl and call it... maybe make checkname Public and call it from a button click on Form1?