How you doing, This is my first post and I have a few questions about VB

1. Is there a way to tell if a program has been unloaded by pressing the 'x' at the top of the screen

2. Can you sort arrays...eg:

Ive got a type:

Public Type something
name as string
num as integer
etc
etc
End Type

And then:

Dim people(0 to 30) as something

I add stuff to that array when something is selected. Name is added but also the order that the thing was selected. Can I then sort the array based on what number is in 'num'

Thanks alot