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

RE: input panel problems by DarrenShaffer

DarrenShaffer
Mon Oct 04 10:25:03 CDT 2004

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
>
>
>

RE: input panel problems by chris

chris
Tue Oct 05 09:15:05 CDT 2004

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
> >
> >
> >

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
>> >
>> >
>> >



Re: input panel problems by yobkadon

yobkadon
Sat Oct 30 13:11:02 CDT 2004

I am also having the same type of problems. I do have a mainmenu tied to my
form with a "File/Open" command that has no code tied to it right now. It
was working previously.

I can create a new project with basically the same code (enabled/disable
upon textbox focus) and it works just fine.

Setting the "inputpanel1.enabled = True" shouldn't cause an exception unless
it's looking for something to exist on the form that's not. The exception
message is totally useless, thanks Microsoft.

There must be something simple that we're missing and I just haven't found
it yet.

Jeff