Damn, my problem arised again! I need to have my form visible when my tasktray icon is clicked. However, when I use setforegroundwindow nothing happens! So instead I use setwindowpos. This works the first time but after that it doesn't work again! My prog doesn't have a title bar and isn't in the taskbar at all.

How can I fix this?

I don't want it to be a topmost window, ie. People must be able to click on another running app and it must go behind it.