I have a password dialog box thathas a edit box on it, it works fine but what i want is for the text box to have automatic focus when it loads so the user does not have to click in it. I have tried creating a variable for the edit box, and using the setfocus() function, but when i do this I get an assertion error. This code I placed in the dialog boxes constructor. Anyone got any ideas?