Re: input panel problems by Darren
Darren
Tue Oct 05 10:49:15 CDT 2004
well, you could pick some other control on the form and call it's .Focus()
method,
before closing the form, but the real question here is why are you getting
an exception
with the SIP enabled when you close your form. if you post the code for the
entire form,
I bet we can figure it out.
-Darren
"chris" <chris@discussions.microsoft.com> wrote in message
news:5DCCD640-8227-4C0F-A1EB-8E28D0768D12@microsoft.com...
> hi..i didn't set the form to close, hide or dispose...besides, the SIP is
> not
> enabled when the form is being close.i've included the main menu as well
> but
> not sure why i got the error.whenever the focus is on the textfield, it
> will
> prompt the error.how should i remove the focus ?
>
> "Darren Shaffer" wrote:
>
>> Chris,
>>
>> How are you closing the form (close, hide, dispose....)? and is the SIP
>> enabled when the form is being closed? If you could post more of your
>> code
>> it would help.
>> I'm also curious if there is a main menu associated with the form.
>>
>> -Darren
>>
>>
>> "chris" wrote:
>>
>> > hi..i have an input panel in one of my form and then i've included some
>> > code
>> > such as below....but when i wanted to close the form, i received an
>> > error
>> > pointing to the inputpanel..how can i solve it??thanks....
>> >
>> >
>> > ***********code that i've added **********************
>> > Private Sub txtTel_LostFocus(ByVal sender As Object, ByVal e As
>> > System.EventArgs) Handles txtState.LostFocus
>> > InputPanel1.Enabled = False
>> > End Sub
>> >
>> > Private Sub txtTel_GotFocus(ByVal sender As Object, ByVal e As
>> > System.EventArgs) Handles txtTel.GotFocus
>> > InputPanel1.Enabled = True
>> > End Sub
>> > ..........etc
>> > .........etc
>> >
>> > *************error msg that i received************
>> > An unhandled exception of type 'System.Exception' occurred in
>> > Microsoft.WindowsCE.Forms.dll
>> >
>> > Additional information: Exception
>> >
>> > Private Sub txtName_LostFocus(ByVal sender As Object, ByVal e As
>> > System.EventArgs) Handles txtName.LostFocus
>> > InputPanel1.Enabled = False <----error here
>> > End Sub
>> >
>> >
>> >