Home All Groups Group Topic Archive Search About

Capitalize Variable Names

Author
30 Mar 2006 3:02 AM
Larry
I am using VB.Net 2003, IDE.

When I type a variable name that already has been Dim'd,
The IDE doesn't make the variable name Capitalized,
even though the variable name definition in the Dim is capitalized.

VB 6 will do this.

Where is the setting so that this will happen. Someone else here at work
uses VB.Net 2003, and his IDE does capitalize variables.

Thanks in Advance,

Larry

Author
30 Mar 2006 4:34 AM
Homer J Simpson
"Larry" <bl***@Blifff.com> wrote in message
news:OpCzRY6UGHA.5172@TK2MSFTNGP12.phx.gbl...

> I am using VB.Net 2003, IDE.
>
> When I type a variable name that already has been Dim'd,
> The IDE doesn't make the variable name Capitalized,
> even though the variable name definition in the Dim is capitalized.
>
> VB 6 will do this.
>
> Where is the setting so that this will happen. Someone else here at work
> uses VB.Net 2003, and his IDE does capitalize variables.

Have you got Option Explicit on?
Author
30 Mar 2006 5:45 PM
Larry
I tried it on and off, it didn't seem to make any difference.


Homer J Simpson wrote:
Show quoteHide quote
> "Larry" <bl***@Blifff.com> wrote in message
> news:OpCzRY6UGHA.5172@TK2MSFTNGP12.phx.gbl...
>
>> I am using VB.Net 2003, IDE.
>>
>> When I type a variable name that already has been Dim'd,
>> The IDE doesn't make the variable name Capitalized,
>> even though the variable name definition in the Dim is capitalized.
>>
>> VB 6 will do this.
>>
>> Where is the setting so that this will happen. Someone else here at work
>> uses VB.Net 2003, and his IDE does capitalize variables.
>
> Have you got Option Explicit on?
>
>
>
Author
30 Mar 2006 6:59 AM
R. MacDonald
Hello, Larry,

It's nested fairly deeply.  Select "Options" from the "Tools" menu.
Then choose the "Text Editor" folder and under that the "Basic"
sub-folder.  In there, choose the "VB Specific" entry and look at the
setting of the "Pretty Listing" check box.

My recollection is that this setting also affects a number of other
formatting related items.  It took me a while to get used to them.  But
the only one that I still object to is the way it insists on
repositioning comments that follow an in-line "If" statement.

Cheers,
Randy


Larry wrote:
Show quoteHide quote
> I am using VB.Net 2003, IDE.
>
> When I type a variable name that already has been Dim'd,
> The IDE doesn't make the variable name Capitalized,
> even though the variable name definition in the Dim is capitalized.
>
> VB 6 will do this.
>
> Where is the setting so that this will happen. Someone else here at work
> uses VB.Net 2003, and his IDE does capitalize variables.
>
> Thanks in Advance,
>
> Larry
Author
30 Mar 2006 8:14 AM
CMM
I have noticed this as well. "Auto-recognition" of declared variables has
been made stupider in VS2005. It worked great in VS2003. Option Strict and
Explicit all on here. I notice it all the time... but never bothered to
figure out why.

I pretend "I didn't just see that".... considering this worked and has been
working great in VB for TEN years. And, now it doesn't.

--
-C. Moya
www.cmoya.com
Show quoteHide quote
"R. MacDonald" <sci***@NO-SP-AMcips.ca> wrote in message
news:442b81e7$0$6030$dbd41001@news.wanadoo.nl...
> Hello, Larry,
>
> It's nested fairly deeply.  Select "Options" from the "Tools" menu. Then
> choose the "Text Editor" folder and under that the "Basic" sub-folder.  In
> there, choose the "VB Specific" entry and look at the setting of the
> "Pretty Listing" check box.
>
> My recollection is that this setting also affects a number of other
> formatting related items.  It took me a while to get used to them.  But
> the only one that I still object to is the way it insists on repositioning
> comments that follow an in-line "If" statement.
>
> Cheers,
> Randy
>
>
> Larry wrote:
>> I am using VB.Net 2003, IDE.
>>
>> When I type a variable name that already has been Dim'd,
>> The IDE doesn't make the variable name Capitalized,
>> even though the variable name definition in the Dim is capitalized.
>>
>> VB 6 will do this.
>>
>> Where is the setting so that this will happen. Someone else here at work
>> uses VB.Net 2003, and his IDE does capitalize variables.
>>
>> Thanks in Advance,
>>
>> Larry
Author
30 Mar 2006 10:54 AM
dgk
On Thu, 30 Mar 2006 03:14:10 -0500, "CMM" <cmm@nospam.com> wrote:

>I have noticed this as well. "Auto-recognition" of declared variables has
>been made stupider in VS2005. It worked great in VS2003. Option Strict and
>Explicit all on here. I notice it all the time... but never bothered to
>figure out why.
>
>I pretend "I didn't just see that".... considering this worked and has been
>working great in VB for TEN years. And, now it doesn't.

I haven't noticed it. I declare a variable with a certain case. Later
on I use the variable using all lower case and when I leave the line
it corrects the case. Are we talking about something else?
Author
30 Mar 2006 12:32 PM
Herfried K. Wagner [MVP]
"CMM" <cmm@nospam.com> schrieb:
>I have noticed this as well. "Auto-recognition" of declared variables has
>been made stupider in VS2005. It worked great in VS2003. Option Strict and
>Explicit all on here. I notice it all the time... but never bothered to
>figure out why.

Same here.  Sometimes VB 2005 doesn't automatically correct capitalization
Show quoteHide quote
:-(((.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
30 Mar 2006 12:59 PM
Cerebrus
Hi Larry,

Usually VS does correct the case, but sometimes it "forgets". In such
cases, just choose Edit -> Advanced -> Format Document, and that should
correct it. Sometimes, saving the code also corrects the case.

HTH,

Regards,

Cerebrus.
Author
30 Mar 2006 2:29 PM
Chris Dunaway
And a shortcut for that is Ctrl-K Ctrl-D
Author
30 Mar 2006 2:38 PM
Herfried K. Wagner [MVP]
"Cerebrus" <zorg***@sify.com> schrieb:
> Usually VS does correct the case, but sometimes it "forgets". In such
> cases, just choose Edit -> Advanced -> Format Document, and that should
> correct it. Sometimes, saving the code also corrects the case.

I've never needed this command in VB6, VB.NET 2002/2003.  This is clearly a
bug that needs to be fixed!

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
30 Mar 2006 3:17 PM
CMM
I wholeheartedly agree.

--
-C. Moya
www.cmoya.com
Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:OeV0ceAVGHA.4864@TK2MSFTNGP12.phx.gbl...
> "Cerebrus" <zorg***@sify.com> schrieb:
>> Usually VS does correct the case, but sometimes it "forgets". In such
>> cases, just choose Edit -> Advanced -> Format Document, and that should
>> correct it. Sometimes, saving the code also corrects the case.
>
> I've never needed this command in VB6, VB.NET 2002/2003.  This is clearly
> a bug that needs to be fixed!
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
30 Mar 2006 3:54 PM
Phill W.
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:OeV0ceAVGHA.4864@TK2MSFTNGP12.phx.gbl...
> "Cerebrus" <zorg***@sify.com> schrieb:
>> Usually VS does correct the case, but sometimes it "forgets". In such
>> cases, just choose Edit -> Advanced -> Format Document, and that should
>> correct it. Sometimes, saving the code also corrects the case.
>
> I've never needed this command in VB6, VB.NET 2002/2003.  This is clearly
> a bug that needs to be fixed!

Agreed,

but just how much /more/ processing power is that going to chew up?  :-)

[Option Paranoia On]
Or, perhaps, this is the Thin End of the Wedge that will finally make VB
a Case-Sensitive language ...

;-))

(I hope ...)

Regards,
    Phill  W.
Author
30 Mar 2006 4:24 PM
CMM
> but just how much /more/ processing power is that going to chew up?  :-)

Considering it worked just fine on a 486 DX-66 and Pentium 60 back in 1994,
I can't see why it should be a big deal today.

--
-C. Moya
www.cmoya.com
Show quoteHide quote
"Phill W." <p-.a-.w-a-r-d@o-p-e-n.a-c.u-k> wrote in message
news:e0gut2$hff$1@yarrow.open.ac.uk...
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:OeV0ceAVGHA.4864@TK2MSFTNGP12.phx.gbl...
>> "Cerebrus" <zorg***@sify.com> schrieb:
>>> Usually VS does correct the case, but sometimes it "forgets". In such
>>> cases, just choose Edit -> Advanced -> Format Document, and that should
>>> correct it. Sometimes, saving the code also corrects the case.
>>
>> I've never needed this command in VB6, VB.NET 2002/2003.  This is clearly
>> a bug that needs to be fixed!
>
> Agreed,
>
> but just how much /more/ processing power is that going to chew up?  :-)
>
> [Option Paranoia On]
> Or, perhaps, this is the Thin End of the Wedge that will finally make VB
> a Case-Sensitive language ...
>
> ;-))
>
> (I hope ...)
>
> Regards,
>    Phill  W.
>
>
Author
30 Mar 2006 5:40 PM
Homer J Simpson
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:OeV0ceAVGHA.4864@TK2MSFTNGP12.phx.gbl...
> "Cerebrus" <zorg***@sify.com> schrieb:
>> Usually VS does correct the case, but sometimes it "forgets". In such
>> cases, just choose Edit -> Advanced -> Format Document, and that should
>> correct it. Sometimes, saving the code also corrects the case.
>
> I've never needed this command in VB6, VB.NET 2002/2003.  This is clearly
> a bug that needs to be fixed!

And unless it's hidden, it's not in VB Express!
Author
30 Mar 2006 6:38 PM
Cerebrus
Hi Herfried,

I rarely need it too, (working in VS 2002/2003), but it occasionally
happens when system memory is running low, and intellisense is taking
its time to be intelligent. In those times, I just save all work, and
run the Format command. Seems to work for me...

Though I hope VS 2005 is much better in all respects. Through another
recent post, I have come to know that VS 2005 is really slow except on
very high config machines. Was quite disheartened to hear that.

Regards,

Cerebrus.
Author
30 Mar 2006 7:22 PM
CMM
I think the background thread(s) that interpret code on-the-fly (whether it
be a compiler or just formatter) is not optimized at all.... especially in
VS2005... and especially in ASP.NET. For instance, often on a WebForm of any
moderate complexity it takes the Property Editor 3 seconds to catch up after
you select a control on the form..... and that's on my top-of-the line (at
least as of 5 months ago... before Duo) P-M-2Ghz (equiv of a 3.4 P4 but
without HT) with 2GB of RAM.

Scrolling around using the arrow keys is often a painful experience. I've
gotten used to it though... and it doesn't bother me much nowadays. I've
convinced myself that VS is doing "lots of important stuff in the background
becuase it's so great."

--
-C. Moya
www.cmoya.com
Show quoteHide quote
"Cerebrus" <zorg***@sify.com> wrote in message
news:1143743932.452031.298690@i39g2000cwa.googlegroups.com...
> Hi Herfried,
>
> I rarely need it too, (working in VS 2002/2003), but it occasionally
> happens when system memory is running low, and intellisense is taking
> its time to be intelligent. In those times, I just save all work, and
> run the Format command. Seems to work for me...
>
> Though I hope VS 2005 is much better in all respects. Through another
> recent post, I have come to know that VS 2005 is really slow except on
> very high config machines. Was quite disheartened to hear that.
>
> Regards,
>
> Cerebrus.
>
Author
30 Mar 2006 10:16 PM
Cerebrus
>> I've convinced myself that VS is doing "lots of important stuff in the background
>> becuase it's so great."

He he, that's a nice way to think of it !

I guess I will have to wait before I can afford to buy a
"top-of-the-line" PC, before I touch VS 2005.

Regards,

Cerebrus.
Author
30 Mar 2006 5:47 PM
Larry
I have Whidbey (2005) on my another machine here at work,
and seems to work fine in regards to this issue.


CMM wrote:
Show quoteHide quote
> I have noticed this as well. "Auto-recognition" of declared variables has
> been made stupider in VS2005. It worked great in VS2003. Option Strict and
> Explicit all on here. I notice it all the time... but never bothered to
> figure out why.
>
> I pretend "I didn't just see that".... considering this worked and has been
> working great in VB for TEN years. And, now it doesn't.
>
Author
30 Mar 2006 5:50 PM
Larry
That did it, Thank You Randy.


R. MacDonald wrote:
Show quoteHide quote
> Hello, Larry,
>
> It's nested fairly deeply.  Select "Options" from the "Tools" menu. Then
> choose the "Text Editor" folder and under that the "Basic" sub-folder. 
> In there, choose the "VB Specific" entry and look at the setting of the
> "Pretty Listing" check box.
>
> My recollection is that this setting also affects a number of other
> formatting related items.  It took me a while to get used to them.  But
> the only one that I still object to is the way it insists on
> repositioning comments that follow an in-line "If" statement.
>
> Cheers,
> Randy
>
>
> Larry wrote:
>> I am using VB.Net 2003, IDE.
>>
>> When I type a variable name that already has been Dim'd,
>> The IDE doesn't make the variable name Capitalized,
>> even though the variable name definition in the Dim is capitalized.
>>
>> VB 6 will do this.
>>
>> Where is the setting so that this will happen. Someone else here at work
>> uses VB.Net 2003, and his IDE does capitalize variables.
>>
>> Thanks in Advance,
>>
>> Larry