Are you able to see it when you open the Phidget Control Panel?
Your program only checks if the Phidget is attached once- it's possible the "Attached" flag hasn't been set yet in the small time between Open() completing and checking the attached status.
Your issue is likely using a blocking open call in the GUI load event - this can lead to a deadlock. You should call the non-blocking open() after registering a Phidget attach event, and interact with the Phidget from it's attach event.