How to avoid automatic renaming of sub signature parameters in visual basic 6.

Posted by systempuntoout on Stack Overflow See other posts from Stack Overflow or by systempuntoout
Published on 2010-03-15T16:12:33Z Indexed on 2010/03/16 7:56 UTC
Read the original article Hit count: 243

Filed under:
|
|

In Visual basic 6, i declare a sub like this:

Private Sub test1(ByRef XmlFooOutput As String)
  ...
End Sub

after that, i declare another sub like the following one:

Private Sub test2(ByRef xmlFooOutput As String)
  ...
End Sub

automagically, the first method is transformed in:

Private Sub test1(ByVal xmlFooOutput As String)
   ...
End Sub

so the XmlFooOutput parameter is transformed in xmlFooOutput.

This is a pretty dangerous feature because, method like those could be mapped to different XSL presentation files that read XML values through Xpath. So when test1 parameter is renamed, XSL bound to test1 method goes broken because Xpath point to XmlFooOuput but the correct value is now in xmlFooOutput.

Is it possible to remove this weird feature? I'm using microsoft visual basic 6.0 (SP6).

This question has some duplicate:

http://stackoverflow.com/questions/1064858/stop-visual-basic-6-from-changing-my-casing http://stackoverflow.com/questions/248760/vb6-editor-changing-case-of-variable-names

from what i see, there's no practical solution to disable this Intellisense evil feature.

© Stack Overflow or respective owner

Related posts about vb6

Related posts about odd-behaviour