Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / September 2007

Tip: Looking for answers? Try searching our database.

Problem with auto-indent

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DaveP - 28 Feb 2007 14:51 GMT
I am working in a Visual Basic application, modifying existing projects and
code.  For the most part, the auto-indent seems to be going what it's
supposed to.  But occasionally, when I'm modifying or deleting code, the
auto-indent for surrounding code seems to get messed up.  Code is indented
one or more times when it shouldn't be.  

I have tried to remove the indentations manually, but when I move to another
line, the incorrect indentation reappears.  This seems to be random - for the
most part, the indentation is working correctly.

Has anyone seen this before, and have you been able to fix it?

Thanks!
Dave P.
Dale - 06 Mar 2007 18:17 GMT
When auto-indentation gets messed up in code, the most common problem is an
error in the code and the IDE can't figure out what the indentation is
supposed to be.  A common problem is an unclosed bracket or parenthesis, a
missing semi-colon at the end of a line (C++, C#, J#, etc. not VB), or an
unterminated string.

Fixing the bug does not fix the indentation.  You can format the code again
by highlighting all the code in question, then press CTRL-K and holding the
CTRL key press F (for Format).

Hope this helps,

Dale
Signature

Dale Preston
MCAD C#
MCSE, MCDBA

> I am working in a Visual Basic application, modifying existing projects and
> code.  For the most part, the auto-indent seems to be going what it's
[quoted text clipped - 10 lines]
> Thanks!
> Dave P.
michael - 30 Sep 2007 13:43 GMT
Glad you posted this. Never would have found it. This solution rocks!
Signature

Michael

> When auto-indentation gets messed up in code, the most common problem is an
> error in the code and the IDE can't figure out what the indentation is
[quoted text clipped - 24 lines]
> > Thanks!
> > Dave P.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.