The GW-Scripting list is a discussion list for information regarding the development and use of Window-Eyes scripts. Any subscriber of the GW-Scripting list has the ability to post on-topic messages.

From:

 "RicksPlace" <ofbgmail@mi.rr.com>

Subject:

 Re: RodMasterVolumePresetRotator 2.0 Released! :)

Date:

 Tue, Apr 2, 2013 8:02:34 am
This is a multi-part message in MIME format.

------=_NextPart_000_0025_01CE2F78.6F045920
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hi Bruce: When you change a control's name there may be several places within the code including code not usually displayed where the original name is used like during the initialization of the form.
When you change the name in the designer the IDE automatically goes through your code and changes all occurances of that control's name so things stay in sync.
You can change the name in the Properties Window and that will also propagate the change throughout your code.
I forget off hand if you change the name of the class in the text editor in the ide if the change ispropagated and I usually change the name in the Properties Window.
One thing to watch out for is that if you change the name I have seen a situation where while the name of the control is changed in the vb.net code class for the control in the form but the event handler line is not changed but just removed and the code didnt throw an error.
So:
Private Sub MyControl_TextBox_Click stays the same but the
clause "Handles MyControl.Click " is gone.
So when I change a controls name I check in the code-behind (the vb.net code block for the form) to ensure the handles claus is there.
It doesnt seem to matter if the sub name MyControl_Click(xxx) is changed during event handling for a control.
So that is just another little thing to watch out for when mucking with changing a control's name.
Rick USA
------=_NextPart_000_0025_01CE2F78.6F045920
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19393">
<STYLE></STYLE>
</HEAD>
<BODY dir=ltr bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi Bruce: When you change a control's name there
may be several places within the code including code not usually displayed where
the original name is used like during the initialization of the
form.</FONT></DIV>
<DIV><FONT size=2 face=Arial>When you change the name in the designer the IDE
automatically goes through your code and changes all occurances of that
control's name so things stay in sync.</FONT></DIV>
<DIV><FONT size=2 face=Arial>You can change the name in the Properties Window
and that will also propagate the change throughout your code.</FONT></DIV>
<DIV><FONT size=2 face=Arial>I forget off hand if you change the name of the
class in the text editor in the ide if the change ispropagated and I usually
change the name in the Properties Window.</FONT></DIV>
<DIV><FONT size=2 face=Arial>One thing to watch out for is that if you change
the name I have seen a situation where while the name of the control is changed
in the vb.net code class for the control in the form but the event handler line
is not changed but just removed and the code didnt throw an error.</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>So:</B></DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><STRONG>Private
Sub MyControl_TextBox_Click stays the same but the</STRONG></DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><STRONG>clause
"Handles MyControl.Click " is gone.</STRONG></DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><STRONG>So
when I change a controls name I check in the code-behind (the vb.net code
block for the form) to ensure the handles claus is there.</STRONG></DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><STRONG>It
doesnt seem to matter if the sub name MyControl_Click(xxx) is changed during
event handling for a control.</STRONG></DIV>
<DIV style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black">
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"><FONT
size=2>So that is just another little thing to watch out for when mucking with
changing a control's name.</FONT></DIV></DIV></DIV></DIV>
<DIV style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black">
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"><FONT
size=2>Rick USA</FONT></DIV></DIV></DIV></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0025_01CE2F78.6F045920--