is SWBF2SERVERMANAGER the window class, or the caption/title of the window? Also, are you sure that the ID of the control will always be 1000? I tested the same code, but removed the double exit points and the check for 1000... I made a quick VB program with a button on it, with a caption of: SWBF2SERVERMANAGER, (and changed the FindWindow, so that it searched by caption and not class) and voila.... worked like a charm for me.
Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague