PC Review


Reply
Thread Tools Rate Thread

The bug of InputPane?

 
 
Dolphin White
Guest
Posts: n/a
 
      3rd Sep 2003
I have two forms, one named FormA, another named FormB, and has the code as
list:

code in FormA:

FormB dlg = new FormB(this);
dlg.ShowDialog();

code in FormB:
_parent.Hide(); //_parent is the parameter passed by constructor
.......
_parent.Show();
_inputPanel.Enabled = false; // <--- Throw an exception, no detail
information.


But if I change the code as below:
code in FormB:
_parent.Hide(); //_parent is the parameter passed by constructor
.......
_inputPanel.Enabled = false;
_parent.Show(); //It works fine.

Why the second one works fine, and the first one thrown an unknown
exception?

Thanks!



 
Reply With Quote
 
 
 
 
Armin Sadeghi [MSFT]
Guest
Posts: n/a
 
      4th Sep 2003
The exception is most likely caused by the fact that FormA does not have a
Menu associated with it, whereas FormB does. It works with your second case
because FormA is hidden and FormB (which probably has a Menu) is shown.
InputPanel.Enabled will only work if you have a mainmenu associated with
the currently visible Form.

The solution would be to place a Menu on your FormA. It can even be empty.

-Armin

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Dolphin White" <(E-Mail Removed)>
| Subject: The bug of InputPane?
| Date: Wed, 3 Sep 2003 09:17:18 +0800
| Lines: 30
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <(E-Mail Removed)>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: 218.80.141.183
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:32605
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I have two forms, one named FormA, another named FormB, and has the code
as
| list:
|
| code in FormA:
|
| FormB dlg = new FormB(this);
| dlg.ShowDialog();
|
| code in FormB:
| _parent.Hide(); //_parent is the parameter passed by constructor
| ......
| _parent.Show();
| _inputPanel.Enabled = false; // <--- Throw an exception, no detail
| information.
|
|
| But if I change the code as below:
| code in FormB:
| _parent.Hide(); //_parent is the parameter passed by constructor
| ......
| _inputPanel.Enabled = false;
| _parent.Show(); //It works fine.
|
| Why the second one works fine, and the first one thrown an unknown
| exception?
|
| Thanks!
|
|
|
|

 
Reply With Quote
 
Dolphin White
Guest
Posts: n/a
 
      5th Sep 2003
Both FormA and FormB have the Menu.

"Armin Sadeghi [MSFT]" <(E-Mail Removed)> дÈëÓʼþ
news:(E-Mail Removed)...
> The exception is most likely caused by the fact that FormA does not have a
> Menu associated with it, whereas FormB does. It works with your second

case
> because FormA is hidden and FormB (which probably has a Menu) is shown.
> InputPanel.Enabled will only work if you have a mainmenu associated with
> the currently visible Form.
>
> The solution would be to place a Menu on your FormA. It can even be empty.
>
> -Armin
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> --------------------
> | From: "Dolphin White" <(E-Mail Removed)>
> | Subject: The bug of InputPane?
> | Date: Wed, 3 Sep 2003 09:17:18 +0800
> | Lines: 30
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> | Message-ID: <(E-Mail Removed)>
> | Newsgroups: microsoft.public.dotnet.framework.compactframework
> | NNTP-Posting-Host: 218.80.141.183
> | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl
> microsoft.public.dotnet.framework.compactframework:32605
> | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
> |
> | I have two forms, one named FormA, another named FormB, and has the code
> as
> | list:
> |
> | code in FormA:
> |
> | FormB dlg = new FormB(this);
> | dlg.ShowDialog();
> |
> | code in FormB:
> | _parent.Hide(); //_parent is the parameter passed by constructor
> | ......
> | _parent.Show();
> | _inputPanel.Enabled = false; // <--- Throw an exception, no detail
> | information.
> |
> |
> | But if I change the code as below:
> | code in FormB:
> | _parent.Hide(); //_parent is the parameter passed by constructor
> | ......
> | _inputPanel.Enabled = false;
> | _parent.Show(); //It works fine.
> |
> | Why the second one works fine, and the first one thrown an unknown
> | exception?
> |
> | Thanks!
> |
> |
> |
> |
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:09 AM.