Hmmm.doesn't sound funny just sounds confused. If you are so impressed by this VC++ routine, why not swap your app over to that language.

BY the way use of the "End" statement is not bad coding!!!!!!!! In the same way that the old goto was considered bad in college, but not in the really world when ya had to write applications that were speed dependant

Personally l avoid End, cos l like to release all resources in the Unload/Terminate events of forms. :0