Application.ParentHandle (gb)

Static Property Read ParentHandle As Integer

Return the identifier of the parent of the current process.