Groups | Blog | Home
all groups > visual studio .net ide > february 2004 >

visual studio .net ide : Region


Michael Morse
2/6/2004 9:06:06 AM
How come in VB.net #region(s) when nested inside each other are not indented like in C#?

v-garych NO[at]SPAM online.microsoft.com
2/7/2004 3:12:11 AM
Hi Mike,

Thanks for posting in the community.

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
clintonG
2/7/2004 11:56:03 AM
I've been asking questions about using #region myself.

I'm using C# and want to modify the indentation, the color
of the border of the box and the color of the text displayed
within the box model.

I'm assuming there is some declaration of style in a template
or configuration file somewhere.

In fact, a document explaining such Visual Studio.NET templates
and configuration files is very much needed and may be available
but where?

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

LaGarde StoreFront 5 Affiliate: e-Commerce Solutions
SEE: http://www.storefront.net/default.asp?REFERER=-201499070




[quoted text, click to view]

timhuang NO[at]SPAM online.microsoft.com
2/9/2004 5:57:11 AM
Hello,

Thanks for your post. As I understand, the problem you are facing is VB
.NET nested #Region statement differs from that in C#. Please correct me if
there is any misunderstanding. I'd like to share the following information
with you:

Based on my experience and research, VB .NET supports nested #Region. In
C#, we are able to add #region statements in any code line. In VB .NET, it
is used to enclose whole method(s), otherwise it reports the following
error message:

'#Region' and '#End Region' statements are not valid within method
bodies.

As you know, this behavior is by design and there is not setting to change.

Please feel free to let me know if you have any problems or concerns.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Michael Morse
2/9/2004 6:16:06 AM
What are you talking about? Did you even read my post? Where in your entire post do you mention indentation!
timhuang NO[at]SPAM online.microsoft.com
2/10/2004 9:27:11 AM
Hi,

I appologize for the misunderstanding. Generally speaking, VB .NET will
automatically put the #Region directive at the beginning of a line. We need
to perfom the following steps to disable auto-formatting VB code so that we
are able to manually indent the #Region:

1. Select the menu "Tools" -> "Options".
2. Go to "Text Editor" -> "Basic" -> "VB Specific".
3. Uncheck "Pretty listing (reformatting) of code.

Please kindly note that uncheck this option will prevent VS .NET IDE from
reformatting all VB .NET code.

Does this answer your question?

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Michael Morse
2/10/2004 12:23:00 PM
OMG

See posting 3 above mine by clintonG

[quoted text, click to view]

clintonG
2/11/2004 3:28:40 PM
Yea. I would prefer no indentation when using #region directives
and a teaxt and box model color such as orange that will stand
out when scrolling.

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/




[quoted text, click to view]

clintonG
2/11/2004 6:55:01 PM
I've nailed this sucker down. See my post subject...

About #region Web Form Designer generated code


--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

[quoted text, click to view]

timhuang NO[at]SPAM online.microsoft.com
2/12/2004 7:45:32 AM
Hi Michael,

The thread clintonG referring to is at the following link:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=eJJU%24F
P8DHA.2064%40TK2MSFTNGP11.phx.gbl&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie
%3DUTF-8%26oe%3DUTF-8%26q%3DclintonG%2B%2523region%26sa%3DN%26tab%3Dwg

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
AddThis Social Bookmark Button