CompuServe Messages

#SetFocus Bug

    15-Oct-91 23:50:43
Sb: #SetFocus Bug
Fm: Jerry Stern 70023,276
To: ALL
I have what seems to be a weird bug when using SetFocus. I have a form with 2 command buttons and one list. When the form loads the active control is on the Command1 button. I want the default active control to be on List1, so I set my last line of code under SUB Form_load List1.SetFocus When running, this gives me an 'Illegal Function Call'. I try to get around this by changing the focus thru: SUB Command1_GotFocus List1.SetFocus and this works fine except now when I click my mouse over Command1 button, the program doesn't access my code under SUB Command1_Click or sometimes my mouse cursor just changes to an hourglass and the computer hangs! I can get around all of this by putting List1.SetFocus in SUB Form_Resize and everything works fine. But why? Anybody know what gives?? <Jerry> There is 1 Reply.