You should find what you need to know here > http://www.xs11.com/forum/showthread.php?t=18087
This is a Simple Dialog Demo.