Thank you very much for marnitzg.

Now my form problem has nearly been solved

But by th way, there are still little pitfalls. Users usually will use several programs at the same time. They may switch the focus to other programs like IE, MS Word, etc from my software and back, by clicking on the taskbar.

I found the toolbar windows of my software are always on top of the screen, so they cover partial areas of the other programs's windows.

So is there any way to make things consistent. i.e. When the focus is on my software, the toolbars here. When it's not, they dun show.

Thanks very much.