Why don't you just change the VI windows property of the subVI to "modal"? (VI properties..Windows apperance..customize). No coding needed!
Quote from the online help:
"Modal � Keeps the front panel on top of all other LabVIEW windows until you close the window or open another modal window. You cannot interact with other windows while a modal window is open. Most dialog boxes in LabVIEW are modal windows, such as the Options dialog box."