By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

recompiling VS NET WinForms app with VS NET 2003 causing serious problems.

P: n/a
We just recently moved one of our major c# apps from VS Net 2002 to VS Net
2003. At first things were looking ok, now problems are starting to
appear.

So far ...

(1) ComboBox.SelectedValue = db_value;

If the db_value was not included in the ComboBox value list the
ComboBox.SelectedIndex used to return -1, Now the very same code is
returning 0, we are checking for -1. We use this trait quite a bit and I
want to know what's going on before weeding it out of 100,000 lines of C#
across 24 separate user controls.

(2) command button 'Access Keys' or Alt-character ...

specified by inserting & into the button text value have begun acting
abnormal. We have a main form that contains 24 user controls each with an
'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002 all
of these keys worked fine. After compiling with VS Net 2003 the ALT-A,
ALT-U & ALT-D buttons work on about half of the controls and refuse to work
on the rest. No clear indication as to why. The data entry staff is
standing outside my cube with Pitch Forks and Axes !!!

What's going on here ???? (Besides not looking carefully enough before we
leaped.)
Is there a FAQ or message thread for problems with VS Net 2002 to VS Net
2003 conversions somewhere?
Near death experiences like this are extremely unplesant.

Thanks in advance.

Barry
Oregon
Nov 15 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
More information.

It turns out pressing command button 'Access Keys' or Alt-character on one
control seems to be randomly triggering the corresponding command button on
another user control contained by the form. i.e. ALT-U on UserControl1 is
triggering the &Update command button on UserControl12.

How does one prevent this type of UserControl 'cross over' when numerous
user controls are contained by the same form?

Thanks in advance.

Barry
Oregon

P.S. I've changed the combobox code (see below) in a couple of instances
from

ComboBox.SelectedValue = dbValueString;
(if ComboBox.SelectedIndex == -1) TO (if ComboBox.SelectedIndex < 1)

in an attempt to determine if dbValueString matches a value in the ComboBox
display List. This change seems to be working for the time being.


"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message
news:#Q**************@TK2MSFTNGP09.phx.gbl...
We just recently moved one of our major c# apps from VS Net 2002 to VS Net
2003. At first things were looking ok, now problems are starting to
appear.

So far ...

(1) ComboBox.SelectedValue = db_value;

If the db_value was not included in the ComboBox value list the
ComboBox.SelectedIndex used to return -1, Now the very same code is
returning 0, we are checking for -1. We use this trait quite a bit and I
want to know what's going on before weeding it out of 100,000 lines of C#
across 24 separate user controls.

(2) command button 'Access Keys' or Alt-character ...

specified by inserting & into the button text value have begun acting
abnormal. We have a main form that contains 24 user controls each with an
'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002 all
of these keys worked fine. After compiling with VS Net 2003 the ALT-A,
ALT-U & ALT-D buttons work on about half of the controls and refuse to work on the rest. No clear indication as to why. The data entry staff is
standing outside my cube with Pitch Forks and Axes !!!

What's going on here ???? (Besides not looking carefully enough before we
leaped.)
Is there a FAQ or message thread for problems with VS Net 2002 to VS Net
2003 conversions somewhere?
Near death experiences like this are extremely unplesant.

Thanks in advance.

Barry
Oregon

Nov 15 '05 #2

P: n/a
Hi Barry,

Based on my test, when you assign a "value" to ComboBox.SelectedValue, if
this value is in the list of the combobox, SelectedIndex is set to its
index. Otherwise, the SelectedIndex property keeps unchanged. As for the
'Access Keys', do you have duplicate Access Keys defined in the
application?

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
Subject: recompiling VS NET WinForms app with VS NET 2003 causing serious problems.Date: Wed, 4 Feb 2004 11:30:58 -0800
Lines: 40
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA07.phx.gbl!TK2MSFTNGXA0
6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.g bl!TK2MSFTNGP09.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:218215
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

We just recently moved one of our major c# apps from VS Net 2002 to VS Net
2003. At first things were looking ok, now problems are starting to
appear.

So far ...

(1) ComboBox.SelectedValue = db_value;

If the db_value was not included in the ComboBox value list the
ComboBox.SelectedIndex used to return -1, Now the very same code is
returning 0, we are checking for -1. We use this trait quite a bit and I
want to know what's going on before weeding it out of 100,000 lines of C#
across 24 separate user controls.

(2) command button 'Access Keys' or Alt-character ...

specified by inserting & into the button text value have begun acting
abnormal. We have a main form that contains 24 user controls each with an
'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002 all
of these keys worked fine. After compiling with VS Net 2003 the ALT-A,
ALT-U & ALT-D buttons work on about half of the controls and refuse to work
on the rest. No clear indication as to why. The data entry staff is
standing outside my cube with Pitch Forks and Axes !!!

What's going on here ???? (Besides not looking carefully enough before we
leaped.)
Is there a FAQ or message thread for problems with VS Net 2002 to VS Net
2003 conversions somewhere?
Near death experiences like this are extremely unplesant.

Thanks in advance.

Barry
Oregon


Nov 15 '05 #3

P: n/a
Felix,

Thanks for the quick response ... our attempt to move to VS Net 2003 is
definitely stopped until we can correct these problems.

1st - Please understand that this data entry application has been WORKING
PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These problems
appeared only when we used VS Net 2003 to recompile the application. This
is a very large and complex data entry application supporting the State of
Oregon's Water Right Tracking system.

The application has a Main Form that contains 24 user controls. EACH USER
CONTROL HAS an
'&Add', '&Update' and '&Delete' button. So the answer to your question is
'yes', the Main Form contains 24 '&Update' buttons, with each User Control
containing a single '&Update' button. However, previously in Net 2002
Access Keys behaved as if each User Control was an application unto itself.
Net 2003 seems to have somehow broken that functionality.

Until we recompiled the app using VS Net 2003, pressing ALT-U within any
control activated the control's '&Update' button. Now we have found that
pressing ALT-U in some controls activates the '&Update' button in a
completely different control. This is a REALLY BAD THING. To add to the
confusion, the Access Keys work correctly and consistently in some controls
and consistently fail (while activating the access key in other completely
unrelated user controls).

We have have reverted to the Net 2002 Version of the app which works
correctly. i.e. Pressing ALT-U within in a control activates that
control's '&Update' button. The combobox issue also works correctly with
the Net 2002 version.

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:hw**************@cpmsftngxa07.phx.gbl...
Hi Barry,

Based on my test, when you assign a "value" to ComboBox.SelectedValue, if
this value is in the list of the combobox, SelectedIndex is set to its
index. Otherwise, the SelectedIndex property keeps unchanged. As for the
'Access Keys', do you have duplicate Access Keys defined in the
application?

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
Subject: recompiling VS NET WinForms app with VS NET 2003 causing serious problems.
Date: Wed, 4 Feb 2004 11:30:58 -0800
Lines: 40
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA07.phx.gbl!TK2MSFTNGXA0 6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.g bl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:218215X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

We just recently moved one of our major c# apps from VS Net 2002 to VS Net2003. At first things were looking ok, now problems are starting to
appear.

So far ...

(1) ComboBox.SelectedValue = db_value;

If the db_value was not included in the ComboBox value list the
ComboBox.SelectedIndex used to return -1, Now the very same code is
returning 0, we are checking for -1. We use this trait quite a bit and Iwant to know what's going on before weeding it out of 100,000 lines of C#
across 24 separate user controls.

(2) command button 'Access Keys' or Alt-character ...

specified by inserting & into the button text value have begun acting
abnormal. We have a main form that contains 24 user controls each with an'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002 allof these keys worked fine. After compiling with VS Net 2003 the ALT-A,
ALT-U & ALT-D buttons work on about half of the controls and refuse to workon the rest. No clear indication as to why. The data entry staff is
standing outside my cube with Pitch Forks and Axes !!!

What's going on here ???? (Besides not looking carefully enough before weleaped.)
Is there a FAQ or message thread for problems with VS Net 2002 to VS Net
2003 conversions somewhere?
Near death experiences like this are extremely unplesant.

Thanks in advance.

Barry
Oregon

Nov 15 '05 #4

P: n/a
Felix,

This situation is so critical that I've started a case with MS Tech support.
I've got a partial solution so far the problem has not been completely
resolved. I'll post to this string with the resolution when the problem is
resolved. Thanks.

Barry
Oregon
"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
Felix,

Thanks for the quick response ... our attempt to move to VS Net 2003 is
definitely stopped until we can correct these problems.

1st - Please understand that this data entry application has been WORKING
PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These problems appeared only when we used VS Net 2003 to recompile the application. This
is a very large and complex data entry application supporting the State of
Oregon's Water Right Tracking system.

The application has a Main Form that contains 24 user controls. EACH USER
CONTROL HAS an
'&Add', '&Update' and '&Delete' button. So the answer to your question is 'yes', the Main Form contains 24 '&Update' buttons, with each User Control containing a single '&Update' button. However, previously in Net 2002
Access Keys behaved as if each User Control was an application unto itself. Net 2003 seems to have somehow broken that functionality.

Until we recompiled the app using VS Net 2003, pressing ALT-U within any
control activated the control's '&Update' button. Now we have found that pressing ALT-U in some controls activates the '&Update' button in a
completely different control. This is a REALLY BAD THING. To add to the
confusion, the Access Keys work correctly and consistently in some controls and consistently fail (while activating the access key in other completely
unrelated user controls).

We have have reverted to the Net 2002 Version of the app which works
correctly. i.e. Pressing ALT-U within in a control activates that
control's '&Update' button. The combobox issue also works correctly with the Net 2002 version.

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:hw**************@cpmsftngxa07.phx.gbl...
Hi Barry,

Based on my test, when you assign a "value" to ComboBox.SelectedValue, if
this value is in the list of the combobox, SelectedIndex is set to its
index. Otherwise, the SelectedIndex property keeps unchanged. As for the
'Access Keys', do you have duplicate Access Keys defined in the
application?

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
Subject: recompiling VS NET WinForms app with VS NET 2003 causing serious
problems.
Date: Wed, 4 Feb 2004 11:30:58 -0800
Lines: 40
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA07.phx.gbl!TK2MSFTNGXA0

6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.g bl!TK2MSFTNGP09.phx.gblXref: cpmsftngxa07.phx.gbl

microsoft.public.dotnet.languages.csharp:218215X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

We just recently moved one of our major c# apps from VS Net 2002 to VS Net2003. At first things were looking ok, now problems are starting to
appear.

So far ...

(1) ComboBox.SelectedValue = db_value;

If the db_value was not included in the ComboBox value list the
ComboBox.SelectedIndex used to return -1, Now the very same code is
returning 0, we are checking for -1. We use this trait quite a bit and I
want to know what's going on before weeding it out of 100,000 lines of
C#across 24 separate user controls.

(2) command button 'Access Keys' or Alt-character ...

specified by inserting & into the button text value have begun acting
abnormal. We have a main form that contains 24 user controls each with

an'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002 allof these keys worked fine. After compiling with VS Net 2003 the ALT-A,
ALT-U & ALT-D buttons work on about half of the controls and refuse to workon the rest. No clear indication as to why. The data entry staff is
standing outside my cube with Pitch Forks and Axes !!!

What's going on here ???? (Besides not looking carefully enough before weleaped.)
Is there a FAQ or message thread for problems with VS Net 2002 to VS Net2003 conversions somewhere?
Near death experiences like this are extremely unplesant.

Thanks in advance.

Barry
Oregon


Nov 15 '05 #5

P: n/a
Thanks for the information. I will take a further look into this issue and
update you if I find anything useful.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
References: <#Q**************@TK2MSFTNGP09.phx.gbl> <hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing serious problems.Date: Thu, 5 Feb 2004 16:59:57 -0800
Lines: 153
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <#j**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP09.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:218632
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Felix,

This situation is so critical that I've started a case with MS Tech support.I've got a partial solution so far the problem has not been completely
resolved. I'll post to this string with the resolution when the problem is
resolved. Thanks.

Barry
Oregon
"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
Felix,

Thanks for the quick response ... our attempt to move to VS Net 2003 is
definitely stopped until we can correct these problems.

1st - Please understand that this data entry application has been WORKING
PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These

problems
appeared only when we used VS Net 2003 to recompile the application. This
is a very large and complex data entry application supporting the State of Oregon's Water Right Tracking system.

The application has a Main Form that contains 24 user controls. EACH USER CONTROL HAS an
'&Add', '&Update' and '&Delete' button. So the answer to your question

is
'yes', the Main Form contains 24 '&Update' buttons, with each User

Control
containing a single '&Update' button. However, previously in Net 2002
Access Keys behaved as if each User Control was an application unto

itself.
Net 2003 seems to have somehow broken that functionality.

Until we recompiled the app using VS Net 2003, pressing ALT-U within any
control activated the control's '&Update' button. Now we have found

that
pressing ALT-U in some controls activates the '&Update' button in a
completely different control. This is a REALLY BAD THING. To add to the
confusion, the Access Keys work correctly and consistently in some

controls
and consistently fail (while activating the access key in other completely unrelated user controls).

We have have reverted to the Net 2002 Version of the app which works
correctly. i.e. Pressing ALT-U within in a control activates that
control's '&Update' button. The combobox issue also works correctly

with
the Net 2002 version.

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:hw**************@cpmsftngxa07.phx.gbl...
> Hi Barry,
>
> Based on my test, when you assign a "value" to ComboBox.SelectedValue,if > this value is in the list of the combobox, SelectedIndex is set to its
> index. Otherwise, the SelectedIndex property keeps unchanged. As for the > 'Access Keys', do you have duplicate Access Keys defined in the
> application?
>
> Regards,
>
> Felix Wu
> =============
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>
>
> --------------------
> >Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
> >From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
> >Subject: recompiling VS NET WinForms app with VS NET 2003 causingserious > problems.
> >Date: Wed, 4 Feb 2004 11:30:58 -0800
> >Lines: 40
> >X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
> >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
> >Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
> >Newsgroups: microsoft.public.dotnet.languages.csharp
> >NNTP-Posting-Host: 159.121.113.234
> >Path:
>

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA07.phx.gbl!TK2MSFTNGXA

0
>6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx. gbl!TK2MSFTNGP09.phx.gbl > >Xref: cpmsftngxa07.phx.gbl

microsoft.public.dotnet.languages.csharp:218215
> >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
> >
> >We just recently moved one of our major c# apps from VS Net 2002 to VS

Net
> >2003. At first things were looking ok, now problems are starting to
> >appear.
> >
> >So far ...
> >
> >(1) ComboBox.SelectedValue = db_value;
> >
> >If the db_value was not included in the ComboBox value list the
> >ComboBox.SelectedIndex used to return -1, Now the very same code is
> >returning 0, we are checking for -1. We use this trait quite a bitand
I
> >want to know what's going on before weeding it out of 100,000 lines of

C# > >across 24 separate user controls.
> >
> >(2) command button 'Access Keys' or Alt-character ...
> >
> >specified by inserting & into the button text value have begun acting
> >abnormal. We have a main form that contains 24 user controls each with an
> >'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002

all
> >of these keys worked fine. After compiling with VS Net 2003 the
ALT-A, > >ALT-U & ALT-D buttons work on about half of the controls and refuse to

work
> >on the rest. No clear indication as to why. The data entry staff is
> >standing outside my cube with Pitch Forks and Axes !!!
> >
> >What's going on here ???? (Besides not looking carefully enough
before we
> >leaped.)
> >
> >
> >Is there a FAQ or message thread for problems with VS Net 2002 to VS

Net > >2003 conversions somewhere?
> >
> >
> >Near death experiences like this are extremely unplesant.
> >
> >Thanks in advance.
> >
> >Barry
> >Oregon
> >
> >
> >
>




Nov 15 '05 #6

P: n/a
Hi Barry,

I repro-ed the accesss key issue you mentioned. To resolve this problem,
you can override ProcessDialogChar in all your UserControls:

public class UserControl1 : System.Windows.Forms.UserControl
{
...
protected override bool ProcessDialogChar(char charCode)
{
if (charCode != ' ' && ProcessMnemonic(charCode)) return true;
return base.ProcessDialogChar(charCode);
}
...
}
However, I am not able to repro SelectedIndex issue. It shows the same
behavior in both .NET Framework 1.0 and 1.1.

Actually, when you set a value to the SelectedValue property, combobox
searches its list and returns the index if the value is found, otherwise,
returns -1. This return value is set to the SelectedIndex property of the
control. Then, combobox needs to update the CurrencyManager.Position
property of the underlying datasource based on the SelectedIndex. However,
the Position will be adjusted to 0 if the SelectedIndex is less than 0.
After this, CurrencyManager updates the underlying datasource if it finds
that the current Position value (is adjusted "0" is this case) is different
from the previous Position value. During this process, CurrencyManager
will udpate the SelectedIndex to the current CurrencyManager.Position
value, that is, 0.

In a nutshell, if the current SelectedIndex is "0", SelectedIndex will
return -1 when you set an invaid value (the value that is not included in
the ComboBox value list ) to the SelectedValue property. If the current
SelectedIndex is not "0", it will return 0.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
References: <#Q**************@TK2MSFTNGP09.phx.gbl> <hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing serious problems.Date: Thu, 5 Feb 2004 16:59:57 -0800
Lines: 153
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <#j**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP09.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:218632
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Felix,

This situation is so critical that I've started a case with MS Tech support.I've got a partial solution so far the problem has not been completely
resolved. I'll post to this string with the resolution when the problem is
resolved. Thanks.

Barry
Oregon
"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
Felix,

Thanks for the quick response ... our attempt to move to VS Net 2003 is
definitely stopped until we can correct these problems.

1st - Please understand that this data entry application has been WORKING
PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These

problems
appeared only when we used VS Net 2003 to recompile the application. This
is a very large and complex data entry application supporting the State of Oregon's Water Right Tracking system.

The application has a Main Form that contains 24 user controls. EACH USER CONTROL HAS an
'&Add', '&Update' and '&Delete' button. So the answer to your question

is
'yes', the Main Form contains 24 '&Update' buttons, with each User

Control
containing a single '&Update' button. However, previously in Net 2002
Access Keys behaved as if each User Control was an application unto

itself.
Net 2003 seems to have somehow broken that functionality.

Until we recompiled the app using VS Net 2003, pressing ALT-U within any
control activated the control's '&Update' button. Now we have found

that
pressing ALT-U in some controls activates the '&Update' button in a
completely different control. This is a REALLY BAD THING. To add to the
confusion, the Access Keys work correctly and consistently in some

controls
and consistently fail (while activating the access key in other completely unrelated user controls).

We have have reverted to the Net 2002 Version of the app which works
correctly. i.e. Pressing ALT-U within in a control activates that
control's '&Update' button. The combobox issue also works correctly

with
the Net 2002 version.

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:hw**************@cpmsftngxa07.phx.gbl...
> Hi Barry,
>
> Based on my test, when you assign a "value" to ComboBox.SelectedValue,if > this value is in the list of the combobox, SelectedIndex is set to its
> index. Otherwise, the SelectedIndex property keeps unchanged. As for the > 'Access Keys', do you have duplicate Access Keys defined in the
> application?
>
> Regards,
>
> Felix Wu
> =============
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>
>
> --------------------
> >Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
> >From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
> >Subject: recompiling VS NET WinForms app with VS NET 2003 causingserious > problems.
> >Date: Wed, 4 Feb 2004 11:30:58 -0800
> >Lines: 40
> >X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
> >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
> >Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
> >Newsgroups: microsoft.public.dotnet.languages.csharp
> >NNTP-Posting-Host: 159.121.113.234
> >Path:
>

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA07.phx.gbl!TK2MSFTNGXA

0
>6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx. gbl!TK2MSFTNGP09.phx.gbl > >Xref: cpmsftngxa07.phx.gbl

microsoft.public.dotnet.languages.csharp:218215
> >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
> >
> >We just recently moved one of our major c# apps from VS Net 2002 to VS

Net
> >2003. At first things were looking ok, now problems are starting to
> >appear.
> >
> >So far ...
> >
> >(1) ComboBox.SelectedValue = db_value;
> >
> >If the db_value was not included in the ComboBox value list the
> >ComboBox.SelectedIndex used to return -1, Now the very same code is
> >returning 0, we are checking for -1. We use this trait quite a bitand
I
> >want to know what's going on before weeding it out of 100,000 lines of

C# > >across 24 separate user controls.
> >
> >(2) command button 'Access Keys' or Alt-character ...
> >
> >specified by inserting & into the button text value have begun acting
> >abnormal. We have a main form that contains 24 user controls each with an
> >'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002

all
> >of these keys worked fine. After compiling with VS Net 2003 the
ALT-A, > >ALT-U & ALT-D buttons work on about half of the controls and refuse to

work
> >on the rest. No clear indication as to why. The data entry staff is
> >standing outside my cube with Pitch Forks and Axes !!!
> >
> >What's going on here ???? (Besides not looking carefully enough
before we
> >leaped.)
> >
> >
> >Is there a FAQ or message thread for problems with VS Net 2002 to VS

Net > >2003 conversions somewhere?
> >
> >
> >Near death experiences like this are extremely unplesant.
> >
> >Thanks in advance.
> >
> >Barry
> >Oregon
> >
> >
> >
>




Nov 15 '05 #7

P: n/a
Felix,

THANKS for the info! Its very much appreciated. I've think we've corrected
the Combobox anomolie by checking for < 1 rather than == -1.

I'm working on integrating the ProcessDialogChar override.

I'll post back to the group with the results.

Again many THANKS !!

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:KK**************@cpmsftngxa07.phx.gbl...
Hi Barry,

I repro-ed the accesss key issue you mentioned. To resolve this problem,
you can override ProcessDialogChar in all your UserControls:

public class UserControl1 : System.Windows.Forms.UserControl
{
...
protected override bool ProcessDialogChar(char charCode)
{
if (charCode != ' ' && ProcessMnemonic(charCode)) return true;
return base.ProcessDialogChar(charCode);
}
...
}
However, I am not able to repro SelectedIndex issue. It shows the same
behavior in both .NET Framework 1.0 and 1.1.

Actually, when you set a value to the SelectedValue property, combobox
searches its list and returns the index if the value is found, otherwise,
returns -1. This return value is set to the SelectedIndex property of the
control. Then, combobox needs to update the CurrencyManager.Position
property of the underlying datasource based on the SelectedIndex. However,
the Position will be adjusted to 0 if the SelectedIndex is less than 0.
After this, CurrencyManager updates the underlying datasource if it finds
that the current Position value (is adjusted "0" is this case) is different from the previous Position value. During this process, CurrencyManager
will udpate the SelectedIndex to the current CurrencyManager.Position
value, that is, 0.

In a nutshell, if the current SelectedIndex is "0", SelectedIndex will
return -1 when you set an invaid value (the value that is not included in
the ComboBox value list ) to the SelectedValue property. If the current
SelectedIndex is not "0", it will return 0.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
References: <#Q**************@TK2MSFTNGP09.phx.gbl> <hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>
Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing

serious problems.
Date: Thu, 5 Feb 2004 16:59:57 -0800
Lines: 153
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <#j**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08 phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:218632
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Felix,

This situation is so critical that I've started a case with MS Tech

support.
I've got a partial solution so far the problem has not been completely
resolved. I'll post to this string with the resolution when the problem isresolved. Thanks.

Barry
Oregon
"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
Felix,

Thanks for the quick response ... our attempt to move to VS Net 2003 is
definitely stopped until we can correct these problems.

1st - Please understand that this data entry application has been WORKING PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These

problems
appeared only when we used VS Net 2003 to recompile the application. This is a very large and complex data entry application supporting the State of Oregon's Water Right Tracking system.

The application has a Main Form that contains 24 user controls. EACH USER CONTROL HAS an
'&Add', '&Update' and '&Delete' button. So the answer to your questionis
'yes', the Main Form contains 24 '&Update' buttons, with each User

Control
containing a single '&Update' button. However, previously in Net 2002
Access Keys behaved as if each User Control was an application unto

itself.
Net 2003 seems to have somehow broken that functionality.

Until we recompiled the app using VS Net 2003, pressing ALT-U within
any control activated the control's '&Update' button. Now we have found

that
pressing ALT-U in some controls activates the '&Update' button in a
completely different control. This is a REALLY BAD THING. To add to the confusion, the Access Keys work correctly and consistently in some

controls
and consistently fail (while activating the access key in other completely unrelated user controls).

We have have reverted to the Net 2002 Version of the app which works
correctly. i.e. Pressing ALT-U within in a control activates that
control's '&Update' button. The combobox issue also works correctly

with
the Net 2002 version.

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:hw**************@cpmsftngxa07.phx.gbl...
> Hi Barry,
>
> Based on my test, when you assign a "value" to ComboBox.SelectedValue,if
> this value is in the list of the combobox, SelectedIndex is set to
its > index. Otherwise, the SelectedIndex property keeps unchanged. As for the > 'Access Keys', do you have duplicate Access Keys defined in the
> application?
>
> Regards,
>
> Felix Wu
> =============
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
> --------------------
> >Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
> >From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
> >Subject: recompiling VS NET WinForms app with VS NET 2003 causing

serious
> problems.
> >Date: Wed, 4 Feb 2004 11:30:58 -0800
> >Lines: 40
> >X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
> >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
> >Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
> >Newsgroups: microsoft.public.dotnet.languages.csharp
> >NNTP-Posting-Host: 159.121.113.234
> >Path:
>

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA07.phx.gbl!TK2MSFTNGXA
0 >

6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx. gbl!TK2MSFTNGP09.phx.gbl
> >Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.languages.csharp:218215
> >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
> >
> >We just recently moved one of our major c# apps from VS Net 2002 to VS Net
> >2003. At first things were looking ok, now problems are starting to > >appear.
> >
> >So far ...
> >
> >(1) ComboBox.SelectedValue = db_value;
> >
> >If the db_value was not included in the ComboBox value list the
> >ComboBox.SelectedIndex used to return -1, Now the very same code is
> >returning 0, we are checking for -1. We use this trait quite a bit

and
I
> >want to know what's going on before weeding it out of 100,000 lines ofC#
> >across 24 separate user controls.
> >
> >(2) command button 'Access Keys' or Alt-character ...
> >
> >specified by inserting & into the button text value have begun
acting > >abnormal. We have a main form that contains 24 user controls each

with an
> >'&Add', '&Update' and '&Delete' button. When compiled in VS Net 2002 all
> >of these keys worked fine. After compiling with VS Net 2003 the ALT-A, > >ALT-U & ALT-D buttons work on about half of the controls and refuse to work
> >on the rest. No clear indication as to why. The data entry staff is
> >standing outside my cube with Pitch Forks and Axes !!!
> >
> >What's going on here ???? (Besides not looking carefully enough before we
> >leaped.)
> >
> >
> >Is there a FAQ or message thread for problems with VS Net 2002 to VS

Net
> >2003 conversions somewhere?
> >
> >
> >Near death experiences like this are extremely unplesant.
> >
> >Thanks in advance.
> >
> >Barry
> >Oregon
> >
> >
> >
>


Nov 15 '05 #8

P: n/a
Welcome, Barry.

However, I am afraid that simply checking SelectedIndex < 1 is not enough.
Since SelectedIndex zero-based, what if the dbValueString happens to be the
same as the first value in the list?

One workaround is to check if the new value equals the first value in the
list when SelectedIndex is 0. For example:

DataRowView drv=(DataRowView)comboBox1.Items[0];

....
comboBox1.SelectedValue=newVal;

if (comboBox1.SelectedIndex==-1 || (comboBox1.SelectedIndex==0 &&
(drv["colName"].ToString()!=newVal.ToString())))
MessageBox.Show("It's Invalid: " + newVal.ToString());
else
MessageBox.Show("It's Valid: " + newVal.ToString());

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
References: <#Q**************@TK2MSFTNGP09.phx.gbl> <hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>
<#j**************@TK2MSFTNGP09.phx.gbl>
<KK**************@cpmsftngxa07.phx.gbl>Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing serious problems.Date: Mon, 9 Feb 2004 08:06:17 -0800
Lines: 267
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <OT**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP10.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:219291
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Felix,

THANKS for the info! Its very much appreciated. I've think we've correctedthe Combobox anomolie by checking for < 1 rather than == -1.

I'm working on integrating the ProcessDialogChar override.

I'll post back to the group with the results.

Again many THANKS !!

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:KK**************@cpmsftngxa07.phx.gbl...
Hi Barry,

I repro-ed the accesss key issue you mentioned. To resolve this problem,
you can override ProcessDialogChar in all your UserControls:

public class UserControl1 : System.Windows.Forms.UserControl
{
...
protected override bool ProcessDialogChar(char charCode)
{
if (charCode != ' ' && ProcessMnemonic(charCode)) return true;
return base.ProcessDialogChar(charCode);
}
...
}
However, I am not able to repro SelectedIndex issue. It shows the same
behavior in both .NET Framework 1.0 and 1.1.

Actually, when you set a value to the SelectedValue property, combobox
searches its list and returns the index if the value is found, otherwise,
returns -1. This return value is set to the SelectedIndex property of the
control. Then, combobox needs to update the CurrencyManager.Position
property of the underlying datasource based on the SelectedIndex. However,
the Position will be adjusted to 0 if the SelectedIndex is less than 0.
After this, CurrencyManager updates the underlying datasource if it finds
that the current Position value (is adjusted "0" is this case) is

different
from the previous Position value. During this process, CurrencyManager
will udpate the SelectedIndex to the current CurrencyManager.Position
value, that is, 0.

In a nutshell, if the current SelectedIndex is "0", SelectedIndex will
return -1 when you set an invaid value (the value that is not included in
the ComboBox value list ) to the SelectedValue property. If the current
SelectedIndex is not "0", it will return 0.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no

rights.


--------------------
>Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
>From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
>References: <#Q**************@TK2MSFTNGP09.phx.gbl>

<hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>
>Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing

serious problems.
>Date: Thu, 5 Feb 2004 16:59:57 -0800
>Lines: 153
>X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
>Message-ID: <#j**************@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.dotnet.languages.csharp
>NNTP-Posting-Host: 159.121.113.234
>Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0

8
phx.gbl!TK2MSFTNGP09.phx.gbl
>Xref: cpmsftngxa07.phx.gblmicrosoft.public.dotnet.languages.csharp:218632 >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
>
>Felix,
>
>This situation is so critical that I've started a case with MS Tech

support.
>I've got a partial solution so far the problem has not been completely
>resolved. I'll post to this string with the resolution when the problemis >resolved. Thanks.
>
>Barry
>Oregon
>
>
>"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message
>news:OW**************@TK2MSFTNGP09.phx.gbl...
>> Felix,
>>
>> Thanks for the quick response ... our attempt to move to VS Net 2003 is >> definitely stopped until we can correct these problems.
>>
>> 1st - Please understand that this data entry application has beenWORKING >> PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These
>problems
>> appeared only when we used VS Net 2003 to recompile the application.

This
>> is a very large and complex data entry application supporting the State of
>> Oregon's Water Right Tracking system.
>>
>> The application has a Main Form that contains 24 user controls. EACH

USER
>> CONTROL HAS an
>> '&Add', '&Update' and '&Delete' button. So the answer to yourquestion >is
>> 'yes', the Main Form contains 24 '&Update' buttons, with each User
>Control
>> containing a single '&Update' button. However, previously in Net
2002 >> Access Keys behaved as if each User Control was an application unto
>itself.
>> Net 2003 seems to have somehow broken that functionality.
>>
>> Until we recompiled the app using VS Net 2003, pressing ALT-U withinany >> control activated the control's '&Update' button. Now we have found
>that
>> pressing ALT-U in some controls activates the '&Update' button in a
>> completely different control. This is a REALLY BAD THING. To add tothe >> confusion, the Access Keys work correctly and consistently in some
>controls
>> and consistently fail (while activating the access key in other

completely
>> unrelated user controls).
>>
>> We have have reverted to the Net 2002 Version of the app which works
>> correctly. i.e. Pressing ALT-U within in a control activates that
>> control's '&Update' button. The combobox issue also works correctly
>with
>> the Net 2002 version.
>>
>> Barry
>> Oregon
>>
>>
>> "Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
>> news:hw**************@cpmsftngxa07.phx.gbl...
>> > Hi Barry,
>> >
>> > Based on my test, when you assign a "value" toComboBox.SelectedValue, >if
>> > this value is in the list of the combobox, SelectedIndex is set toits >> > index. Otherwise, the SelectedIndex property keeps unchanged. As for

the
>> > 'Access Keys', do you have duplicate Access Keys defined in the
>> > application?
>> >
>> > Regards,
>> >
>> > Felix Wu
>> > =============
>> > This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> >
>> >
>> > --------------------
>> > >Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
>> > >From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
>> > >Subject: recompiling VS NET WinForms app with VS NET 2003 causing
>serious
>> > problems.
>> > >Date: Wed, 4 Feb 2004 11:30:58 -0800
>> > >Lines: 40
>> > >X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
>> > >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
>> > >Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
>> > >Newsgroups: microsoft.public.dotnet.languages.csharp
>> > >NNTP-Posting-Host: 159.121.113.234
>> > >Path:
>> >
>>


cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSF TNGXA07.phx.gbl!TK2MSFTNGX A 0
>> >

6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx. gbl!TK2MSFTNGP09.phx.gbl >> > >Xref: cpmsftngxa07.phx.gbl
>> microsoft.public.dotnet.languages.csharp:218215
>> > >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
>> > >
>> > >We just recently moved one of our major c# apps from VS Net 2002 toVS >> Net
>> > >2003. At first things were looking ok, now problems are startingto >> > >appear.
>> > >
>> > >So far ...
>> > >
>> > >(1) ComboBox.SelectedValue = db_value;
>> > >
>> > >If the db_value was not included in the ComboBox value list the
>> > >ComboBox.SelectedIndex used to return -1, Now the very same code is
>> > >returning 0, we are checking for -1. We use this trait quite a bit >and
>> I
>> > >want to know what's going on before weeding it out of 100,000 linesof >C#
>> > >across 24 separate user controls.
>> > >
>> > >(2) command button 'Access Keys' or Alt-character ...
>> > >
>> > >specified by inserting & into the button text value have begunacting >> > >abnormal. We have a main form that contains 24 user controls each

with
>> an
>> > >'&Add', '&Update' and '&Delete' button. When compiled in VS Net2002 >> all
>> > >of these keys worked fine. After compiling with VS Net 2003 the

ALT-A,
>> > >ALT-U & ALT-D buttons work on about half of the controls and refuseto >> work
>> > >on the rest. No clear indication as to why. The data entry staff is >> > >standing outside my cube with Pitch Forks and Axes !!!
>> > >
>> > >What's going on here ???? (Besides not looking carefully enough

before
>> we
>> > >leaped.)
>> > >
>> > >
>> > >Is there a FAQ or message thread for problems with VS Net 2002 to VS >Net
>> > >2003 conversions somewhere?
>> > >
>> > >
>> > >Near death experiences like this are extremely unplesant.
>> > >
>> > >Thanks in advance.
>> > >
>> > >Barry
>> > >Oregon
>> > >
>> > >
>> > >
>> >
>>
>>
>
>
>



Nov 15 '05 #9

P: n/a
Felix,

1st: The override of ProcessDialogChar( ) method is working great. It
forces our User Controls to handle the ALT- keys 'locally' just as we
needed. Yahooo.

2nd: Thanks for the 'heads up' on the combobox. Its very much appreciated.
We've avoided this particular issue because most of our comboboxes are
loaded from lookup tables that include a blank (null) display value that we
place at SelectedIndex 0. :-) So the method we're now using resets the
Combobox index to 0, then loads the db value into the
ComboBox.SelectedValue. The database values will never be blank or null in
these cases so if the Selected Index is < 1 we know that there was no match.
Seems to be working so far. :-)

Thank you very much for your help with this issue.

Best wishes & Happy Computing!

Barry
Oregon

"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:VE**************@cpmsftngxa07.phx.gbl...
Welcome, Barry.

However, I am afraid that simply checking SelectedIndex < 1 is not enough.
Since SelectedIndex zero-based, what if the dbValueString happens to be the same as the first value in the list?

One workaround is to check if the new value equals the first value in the
list when SelectedIndex is 0. For example:

DataRowView drv=(DataRowView)comboBox1.Items[0];

...
comboBox1.SelectedValue=newVal;

if (comboBox1.SelectedIndex==-1 || (comboBox1.SelectedIndex==0 &&
(drv["colName"].ToString()!=newVal.ToString())))
MessageBox.Show("It's Invalid: " + newVal.ToString());
else
MessageBox.Show("It's Valid: " + newVal.ToString());

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
References: <#Q**************@TK2MSFTNGP09.phx.gbl> <hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>
<#j**************@TK2MSFTNGP09.phx.gbl>
<KK**************@cpmsftngxa07.phx.gbl>
Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing

serious problems.
Date: Mon, 9 Feb 2004 08:06:17 -0800
Lines: 267
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <OT**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08 phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:219291
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Felix,

THANKS for the info! Its very much appreciated. I've think we've

corrected
the Combobox anomolie by checking for < 1 rather than == -1.

I'm working on integrating the ProcessDialogChar override.

I'll post back to the group with the results.

Again many THANKS !!

Barry
Oregon
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:KK**************@cpmsftngxa07.phx.gbl...
Hi Barry,

I repro-ed the accesss key issue you mentioned. To resolve this problem, you can override ProcessDialogChar in all your UserControls:

public class UserControl1 : System.Windows.Forms.UserControl
{
...
protected override bool ProcessDialogChar(char charCode)
{
if (charCode != ' ' && ProcessMnemonic(charCode)) return true;
return base.ProcessDialogChar(charCode);
}
...
}
However, I am not able to repro SelectedIndex issue. It shows the same
behavior in both .NET Framework 1.0 and 1.1.

Actually, when you set a value to the SelectedValue property, combobox
searches its list and returns the index if the value is found, otherwise, returns -1. This return value is set to the SelectedIndex property of the control. Then, combobox needs to update the CurrencyManager.Position
property of the underlying datasource based on the SelectedIndex. However, the Position will be adjusted to 0 if the SelectedIndex is less than 0.
After this, CurrencyManager updates the underlying datasource if it finds that the current Position value (is adjusted "0" is this case) is

different
from the previous Position value. During this process, CurrencyManager
will udpate the SelectedIndex to the current CurrencyManager.Position
value, that is, 0.

In a nutshell, if the current SelectedIndex is "0", SelectedIndex will
return -1 when you set an invaid value (the value that is not included in the ComboBox value list ) to the SelectedValue property. If the current
SelectedIndex is not "0", it will return 0.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no

rights.


--------------------
>Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
>From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
>References: <#Q**************@TK2MSFTNGP09.phx.gbl>
<hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>
>Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing
serious problems.
>Date: Thu, 5 Feb 2004 16:59:57 -0800
>Lines: 153
>X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
>Message-ID: <#j**************@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.dotnet.languages.csharp
>NNTP-Posting-Host: 159.121.113.234
>Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0
8 phx.gbl!TK2MSFTNGP09.phx.gbl
>Xref: cpmsftngxa07.phx.gbl

microsoft.public.dotnet.languages.csharp:218632
>X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
>
>Felix,
>
>This situation is so critical that I've started a case with MS Tech
support.
>I've got a partial solution so far the problem has not been completely
>resolved. I'll post to this string with the resolution when the problemis
>resolved. Thanks.
>
>Barry
>Oregon
>
>
>"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message
>news:OW**************@TK2MSFTNGP09.phx.gbl...
>> Felix,
>>
>> Thanks for the quick response ... our attempt to move to VS Net 2003 is >> definitely stopped until we can correct these problems.
>>
>> 1st - Please understand that this data entry application has been

WORKING
>> PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These
>problems
>> appeared only when we used VS Net 2003 to recompile the application.
This
>> is a very large and complex data entry application supporting the State of
>> Oregon's Water Right Tracking system.
>>
>> The application has a Main Form that contains 24 user controls.
EACH USER
>> CONTROL HAS an
>> '&Add', '&Update' and '&Delete' button. So the answer to your

question
>is
>> 'yes', the Main Form contains 24 '&Update' buttons, with each User
>Control
>> containing a single '&Update' button. However, previously in Net 2002 >> Access Keys behaved as if each User Control was an application unto
>itself.
>> Net 2003 seems to have somehow broken that functionality.
>>
>> Until we recompiled the app using VS Net 2003, pressing ALT-U withinany
>> control activated the control's '&Update' button. Now we have
found >that
>> pressing ALT-U in some controls activates the '&Update' button in a
>> completely different control. This is a REALLY BAD THING. To add to
the
>> confusion, the Access Keys work correctly and consistently in some
>controls
>> and consistently fail (while activating the access key in other
completely
>> unrelated user controls).
>>
>> We have have reverted to the Net 2002 Version of the app which works
>> correctly. i.e. Pressing ALT-U within in a control activates that
>> control's '&Update' button. The combobox issue also works
correctly >with
>> the Net 2002 version.
>>
>> Barry
>> Oregon
>>
>>
>> "Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
>> news:hw**************@cpmsftngxa07.phx.gbl...
>> > Hi Barry,
>> >
>> > Based on my test, when you assign a "value" to

ComboBox.SelectedValue,
>if
>> > this value is in the list of the combobox, SelectedIndex is set to

its
>> > index. Otherwise, the SelectedIndex property keeps unchanged. As for the
>> > 'Access Keys', do you have duplicate Access Keys defined in the
>> > application?
>> >
>> > Regards,
>> >
>> > Felix Wu
>> > =============
>> > This posting is provided "AS IS" with no warranties, and confers no >> rights.
>> >
>> >
>> > --------------------
>> > >Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
>> > >From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
>> > >Subject: recompiling VS NET WinForms app with VS NET 2003 causing
>serious
>> > problems.
>> > >Date: Wed, 4 Feb 2004 11:30:58 -0800
>> > >Lines: 40
>> > >X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
>> > >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
>> > >Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
>> > >Newsgroups: microsoft.public.dotnet.languages.csharp
>> > >NNTP-Posting-Host: 159.121.113.234
>> > >Path:
>> >
>>

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSF TNGXA07.phx.gbl!TK2MSFTNGX

A 0
>> >

6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx. gbl!TK2MSFTNGP09.phx.gbl
>> > >Xref: cpmsftngxa07.phx.gbl
>> microsoft.public.dotnet.languages.csharp:218215
>> > >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
>> > >
>> > >We just recently moved one of our major c# apps from VS Net 2002 toVS
>> Net
>> > >2003. At first things were looking ok, now problems are
starting
to
>> > >appear.
>> > >
>> > >So far ...
>> > >
>> > >(1) ComboBox.SelectedValue = db_value;
>> > >
>> > >If the db_value was not included in the ComboBox value list the
>> > >ComboBox.SelectedIndex used to return -1, Now the very same code
is >> > >returning 0, we are checking for -1. We use this trait quite a

bit >and
>> I
>> > >want to know what's going on before weeding it out of 100,000 linesof
>C#
>> > >across 24 separate user controls.
>> > >
>> > >(2) command button 'Access Keys' or Alt-character ...
>> > >
>> > >specified by inserting & into the button text value have begun

acting
>> > >abnormal. We have a main form that contains 24 user controls
each with
>> an
>> > >'&Add', '&Update' and '&Delete' button. When compiled in VS Net

2002
>> all
>> > >of these keys worked fine. After compiling with VS Net 2003 the
ALT-A,
>> > >ALT-U & ALT-D buttons work on about half of the controls and
refuseto
>> work
>> > >on the rest. No clear indication as to why. The data entry staff

is >> > >standing outside my cube with Pitch Forks and Axes !!!
>> > >
>> > >What's going on here ???? (Besides not looking carefully enough
before
>> we
>> > >leaped.)
>> > >
>> > >
>> > >Is there a FAQ or message thread for problems with VS Net 2002 to VS >Net
>> > >2003 conversions somewhere?
>> > >
>> > >
>> > >Near death experiences like this are extremely unplesant.
>> > >
>> > >Thanks in advance.
>> > >
>> > >Barry
>> > >Oregon
>> > >
>> > >
>> > >
>> >
>>
>>
>
>
>


Nov 15 '05 #10

P: n/a
That's great! Enjoy it :-)

Bet Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
References: <#Q**************@TK2MSFTNGP09.phx.gbl> <hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>
<#j**************@TK2MSFTNGP09.phx.gbl>
<KK**************@cpmsftngxa07.phx.gbl>
<OT**************@TK2MSFTNGP10.phx.gbl>
<VE**************@cpmsftngxa07.phx.gbl>Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing serious problems.Date: Tue, 10 Feb 2004 09:07:48 -0800
Lines: 381
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
Message-ID: <#Z**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 159.121.113.234
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP09.
phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:219602
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Felix,

1st: The override of ProcessDialogChar( ) method is working great. It
forces our User Controls to handle the ALT- keys 'locally' just as we
needed. Yahooo.

2nd: Thanks for the 'heads up' on the combobox. Its very much appreciated.We've avoided this particular issue because most of our comboboxes are
loaded from lookup tables that include a blank (null) display value that we
place at SelectedIndex 0. :-) So the method we're now using resets the
Combobox index to 0, then loads the db value into the
ComboBox.SelectedValue. The database values will never be blank or null in
these cases so if the Selected Index is < 1 we know that there was no match.Seems to be working so far. :-)

Thank you very much for your help with this issue.

Best wishes & Happy Computing!

Barry
Oregon

"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:VE**************@cpmsftngxa07.phx.gbl...
Welcome, Barry.

However, I am afraid that simply checking SelectedIndex < 1 is not enough.
Since SelectedIndex zero-based, what if the dbValueString happens to be

the
same as the first value in the list?

One workaround is to check if the new value equals the first value in the
list when SelectedIndex is 0. For example:

DataRowView drv=(DataRowView)comboBox1.Items[0];

...
comboBox1.SelectedValue=newVal;

if (comboBox1.SelectedIndex==-1 || (comboBox1.SelectedIndex==0 &&
(drv["colName"].ToString()!=newVal.ToString())))
MessageBox.Show("It's Invalid: " + newVal.ToString());
else
MessageBox.Show("It's Valid: " + newVal.ToString());

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no

rights.


--------------------
>Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
>From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
>References: <#Q**************@TK2MSFTNGP09.phx.gbl>

<hw**************@cpmsftngxa07.phx.gbl>
<OW**************@TK2MSFTNGP09.phx.gbl>
<#j**************@TK2MSFTNGP09.phx.gbl>
<KK**************@cpmsftngxa07.phx.gbl>
>Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing

serious problems.
>Date: Mon, 9 Feb 2004 08:06:17 -0800
>Lines: 267
>X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
>Message-ID: <OT**************@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.languages.csharp
>NNTP-Posting-Host: 159.121.113.234
>Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0

8
phx.gbl!TK2MSFTNGP10.phx.gbl
>Xref: cpmsftngxa07.phx.gblmicrosoft.public.dotnet.languages.csharp:219291 >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
>
>Felix,
>
>THANKS for the info! Its very much appreciated. I've think we've

corrected
>the Combobox anomolie by checking for < 1 rather than == -1.
>
>I'm working on integrating the ProcessDialogChar override.
>
>I'll post back to the group with the results.
>
>Again many THANKS !!
>
>Barry
>Oregon
>
>
>"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
>news:KK**************@cpmsftngxa07.phx.gbl...
>> Hi Barry,
>>
>> I repro-ed the accesss key issue you mentioned. To resolve thisproblem, >> you can override ProcessDialogChar in all your UserControls:
>>
>> public class UserControl1 : System.Windows.Forms.UserControl
>> {
>> ...
>> protected override bool ProcessDialogChar(char charCode)
>> {
>> if (charCode != ' ' && ProcessMnemonic(charCode)) return true;
>> return base.ProcessDialogChar(charCode);
>> }
>> ...
>> }
>>
>>
>> However, I am not able to repro SelectedIndex issue. It shows the same
>> behavior in both .NET Framework 1.0 and 1.1.
>>
>> Actually, when you set a value to the SelectedValue property, combobox
>> searches its list and returns the index if the value is found,otherwise, >> returns -1. This return value is set to the SelectedIndex property ofthe >> control. Then, combobox needs to update the CurrencyManager.Position
>> property of the underlying datasource based on the SelectedIndex.

However,
>> the Position will be adjusted to 0 if the SelectedIndex is less than 0. >> After this, CurrencyManager updates the underlying datasource if itfinds >> that the current Position value (is adjusted "0" is this case) is
>different
>> from the previous Position value. During this process, CurrencyManager >> will udpate the SelectedIndex to the current CurrencyManager.Position
>> value, that is, 0.
>>
>> In a nutshell, if the current SelectedIndex is "0", SelectedIndex will
>> return -1 when you set an invaid value (the value that is not includedin >> the ComboBox value list ) to the SelectedValue property. If the current >> SelectedIndex is not "0", it will return 0.
>>
>> Regards,
>>
>> Felix Wu
>> =============
>> This posting is provided "AS IS" with no warranties, and confers no
>rights.
>>
>>
>> --------------------
>> >Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
>> >From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
>> >References: <#Q**************@TK2MSFTNGP09.phx.gbl>
>> <hw**************@cpmsftngxa07.phx.gbl>
>> <OW**************@TK2MSFTNGP09.phx.gbl>
>> >Subject: Re: recompiling VS NET WinForms app with VS NET 2003 causing
>> serious problems.
>> >Date: Thu, 5 Feb 2004 16:59:57 -0800
>> >Lines: 153
>> >X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
>> >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
>> >Message-ID: <#j**************@TK2MSFTNGP09.phx.gbl>
>> >Newsgroups: microsoft.public.dotnet.languages.csharp
>> >NNTP-Posting-Host: 159.121.113.234
>> >Path:
>>


cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSF TNGXA05.phx.gbl!TK2MSFTNGP 0 8
>> phx.gbl!TK2MSFTNGP09.phx.gbl
>> >Xref: cpmsftngxa07.phx.gbl
>microsoft.public.dotnet.languages.csharp:218632
>> >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
>> >
>> >Felix,
>> >
>> >This situation is so critical that I've started a case with MS Tech
>> support.
>> >I've got a partial solution so far the problem has not been completely >> >resolved. I'll post to this string with the resolution when theproblem >is
>> >resolved. Thanks.
>> >
>> >Barry
>> >Oregon
>> >
>> >
>> >"BBFrost" <barry.b.frost@remove_this.wrd.state.or.us> wrote in message >> >news:OW**************@TK2MSFTNGP09.phx.gbl...
>> >> Felix,
>> >>
>> >> Thanks for the quick response ... our attempt to move to VS Net 2003 is
>> >> definitely stopped until we can correct these problems.
>> >>
>> >> 1st - Please understand that this data entry application has been
>WORKING
>> >> PROBLEM FREE FOR OVER A YEAR when compiled with VS Net 2002. These
>> >problems
>> >> appeared only when we used VS Net 2003 to recompile the
application. >> This
>> >> is a very large and complex data entry application supporting the

State
>> of
>> >> Oregon's Water Right Tracking system.
>> >>
>> >> The application has a Main Form that contains 24 user controls.EACH >> USER
>> >> CONTROL HAS an
>> >> '&Add', '&Update' and '&Delete' button. So the answer to your
>question
>> >is
>> >> 'yes', the Main Form contains 24 '&Update' buttons, with each User
>> >Control
>> >> containing a single '&Update' button. However, previously in Net

2002
>> >> Access Keys behaved as if each User Control was an application unto
>> >itself.
>> >> Net 2003 seems to have somehow broken that functionality.
>> >>
>> >> Until we recompiled the app using VS Net 2003, pressing ALT-Uwithin >any
>> >> control activated the control's '&Update' button. Now we havefound >> >that
>> >> pressing ALT-U in some controls activates the '&Update' button in a >> >> completely different control. This is a REALLY BAD THING. To addto >the
>> >> confusion, the Access Keys work correctly and consistently in some
>> >controls
>> >> and consistently fail (while activating the access key in other
>> completely
>> >> unrelated user controls).
>> >>
>> >> We have have reverted to the Net 2002 Version of the app which works >> >> correctly. i.e. Pressing ALT-U within in a control activates that
>> >> control's '&Update' button. The combobox issue also workscorrectly >> >with
>> >> the Net 2002 version.
>> >>
>> >> Barry
>> >> Oregon
>> >>
>> >>
>> >> "Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
>> >> news:hw**************@cpmsftngxa07.phx.gbl...
>> >> > Hi Barry,
>> >> >
>> >> > Based on my test, when you assign a "value" to
>ComboBox.SelectedValue,
>> >if
>> >> > this value is in the list of the combobox, SelectedIndex is set to >its
>> >> > index. Otherwise, the SelectedIndex property keeps unchanged. Asfor >> the
>> >> > 'Access Keys', do you have duplicate Access Keys defined in the
>> >> > application?
>> >> >
>> >> > Regards,
>> >> >
>> >> > Felix Wu
>> >> > =============
>> >> > This posting is provided "AS IS" with no warranties, and confersno >> >> rights.
>> >> >
>> >> >
>> >> > --------------------
>> >> > >Reply-To: "BBFrost" <ba***********@wrd.state.or.us>
>> >> > >From: "BBFrost" <barry.b.frost@remove_this.wrd.state.or.us>
>> >> > >Subject: recompiling VS NET WinForms app with VS NET 2003 causing >> >serious
>> >> > problems.
>> >> > >Date: Wed, 4 Feb 2004 11:30:58 -0800
>> >> > >Lines: 40
>> >> > >X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
>> >> > >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
>> >> > >Message-ID: <#Q**************@TK2MSFTNGP09.phx.gbl>
>> >> > >Newsgroups: microsoft.public.dotnet.languages.csharp
>> >> > >NNTP-Posting-Host: 159.121.113.234
>> >> > >Path:
>> >> >
>> >>
>>

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MS FTNGXA07.phx.gbl!TK2MSFTNG X A
>> 0
>> >> >
>>

6.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx. gbl!TK2MSFTNGP09.phx.gbl
>> >> > >Xref: cpmsftngxa07.phx.gbl
>> >> microsoft.public.dotnet.languages.csharp:218215
>> >> > >X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
>> >> > >
>> >> > >We just recently moved one of our major c# apps from VS Net 2002to >VS
>> >> Net
>> >> > >2003. At first things were looking ok, now problems arestarting >to
>> >> > >appear.
>> >> > >
>> >> > >So far ...
>> >> > >
>> >> > >(1) ComboBox.SelectedValue = db_value;
>> >> > >
>> >> > >If the db_value was not included in the ComboBox value list the
>> >> > >ComboBox.SelectedIndex used to return -1, Now the very same codeis >> >> > >returning 0, we are checking for -1. We use this trait quite a

bit
>> >and
>> >> I
>> >> > >want to know what's going on before weeding it out of 100,000lines >of
>> >C#
>> >> > >across 24 separate user controls.
>> >> > >
>> >> > >(2) command button 'Access Keys' or Alt-character ...
>> >> > >
>> >> > >specified by inserting & into the button text value have begun
>acting
>> >> > >abnormal. We have a main form that contains 24 user controlseach >> with
>> >> an
>> >> > >'&Add', '&Update' and '&Delete' button. When compiled in VS
Net >2002
>> >> all
>> >> > >of these keys worked fine. After compiling with VS Net 2003 the
>> ALT-A,
>> >> > >ALT-U & ALT-D buttons work on about half of the controls andrefuse >to
>> >> work
>> >> > >on the rest. No clear indication as to why. The data entry

staff is
>> >> > >standing outside my cube with Pitch Forks and Axes !!!
>> >> > >
>> >> > >What's going on here ???? (Besides not looking carefully enough
>> before
>> >> we
>> >> > >leaped.)
>> >> > >
>> >> > >
>> >> > >Is there a FAQ or message thread for problems with VS Net 2002
to VS
>> >Net
>> >> > >2003 conversions somewhere?
>> >> > >
>> >> > >
>> >> > >Near death experiences like this are extremely unplesant.
>> >> > >
>> >> > >Thanks in advance.
>> >> > >
>> >> > >Barry
>> >> > >Oregon
>> >> > >
>> >> > >
>> >> > >
>> >> >
>> >>
>> >>
>> >
>> >
>> >
>>
>
>
>



Nov 15 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.