IT Community - Software Programming, Web Development and Technical Support

Visual Studio Tips & Tricks

This is a discussion on Visual Studio Tips & Tricks within the C# Programming forums, part of the Software Development category; Hey, Visual Studio 2005 is the leading developer tool on the market, and I would like to share with you ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 08-24-2007, 03:53 AM
SaravananJ SaravananJ is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 79
SaravananJ is on a distinguished road
Thumbs up Visual Studio Tips & Tricks

Hey,

Visual Studio 2005 is the leading developer tool on the market, and I would like to share with you some tips and tricks that will make this great tool even more powerful. Getting familiar with a tool is crucial to getting the most out of the tool, and development tools and IDEs are no different. But with the many new technologies such as C# 2.0, ASP .NET 2.0, WWF, WPF,and WCF,I hope you will learn a couple of useful things that will make your life inside Visual Studio more pleasant and productive.


keyboard shortcuts :

Ever wished that you never have to take your hands off the keyboard when you are doing your development inside Visual Studio? If you are a power user, you will certainly enjoy the using keyboard shortcuts to perform various operations more quickly. I am sure most of you are already familiar with some of them: F5 for Debug.Start, F10 for Debug.StepOver, F4 for View.Properties. There are several other very useful keyboard shortcuts that are less known. I have included some of my favorites below.


F7 :- Toggles between design and code views.

F9
:- Toggles breakpoint.

F12
:- Go to definition of a variable, object, or function.

Ctrl+Shift+7
Ctrl+Shift+8 :- Quickly navigate forward and backwards in the go to definition stack.

Shift+F12:- Find all references of a function or a variable.

Ctrl+M
, Ctrl+M
:- Expand and collapse code outlining in the editor.

Ctrl+K
, Ctrl+C
Ctrl+K, Ctrl+U :- Comment and uncomment line(s) of code, respectively.

Shift+Alt+Enter
:- Toggles between full screen mode and normal mode.

Ctrl+I
:- Incremental Search.
__________________
J.Saravanan

Last edited by SaravananJ : 08-24-2007 at 04:50 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-24-2007, 05:08 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

hi

HTML Editor Source View

Ctrl+Shift+. - View AutoCloseTagOverride

Shift+F7
- ViewViewDesigner

Ctrl+PgDn
- ViewNextView

Ctrl+PgUp
- WindowPreviousTab
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-25-2007, 04:25 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Cool Re: Visual Studio Tips & Tricks

Hi buddies,

Here is some Tool Window shortcut keys for .NET

CTRL + SHIFT + M - Tools.CommandWindowMarkMode

Places the Command window in a mode allowing for the selection of text within the window.

CTRL + SHIFT + C - View.ClassView

Displays the Class View window.

CTRL + ALT + A - View.CommandWindow

Displays the Command window, which allows you to type commands that manipulate the IDE.

CTRL + ALT + T - View.DocumentOutline

Displays the Document Outline window to view the flat or hierarchical outline of the current document.

CTRL + ALT + F - View.Favorites

Displays the Favorites window, which lists shortcuts to Web pages.

CTRL + ALT + O - View.Output

Displays the Output window to view status messages at run time.

F4 - View.PropertiesWindow

Displays the Properties window, which lists the design-time properties and events for the currently selected item.

SHIFT + F4 - View.PropertyPages

Displays the property pages for the item currently selected.

CTRL + SHIFT + E
- View.ResourceView

Displays the Resource View window.

CTRL + ALT + S - View.ServerExplorer

Displays the Server Explorer window, which allows you to view and manipulate database servers, event logs, message queues, Web services, and many other operating system services.

CTRL + ALT + R - View.ShowWebBrowser

Displays the Web browser window, which allows you to view pages on the Internet.

CTRL + ALT + L - View.SolutionExplorer

Displays Solution Explorer, which lists the projects and files in the current solution.

CTRL + ALT + K - View.TaskList

Displays the Task List window where you customize, categorize, and manage tasks, comments, shortcuts, warnings and error messages.

CTRL + ALT + X - View.Toolbox

Displays the Toolbox, which contains controls and other items that can be included or used with your code.

Cheers....
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-28-2007, 12:19 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: Visual Studio Tips & Tricks

Hi Friends,

Here is some project shortcut keys ....

CTRL + SHIFT + B - Build.BuildSolution

Builds the solution.

CTRL + F7 - Build.Compile

Creates an object file containing machine code, linker directives, sections, external references, and function/data names for the selected file.

SHIFT + ALT + A - File.AddExistingItem

Displays the Add Existing Item dialog box, which allows you to add an existing file to the current project.

CTRL + SHIFT + A - File.AddNewItem

Displays the Add New Item dialog box, which allows you to add a new file to the current project.
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-28-2007, 12:31 AM
SaravananJ SaravananJ is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 79
SaravananJ is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Hey,

Here i listed Keyboard shortcuts for XML Editor Schema View

Ctrl+- - Will collapse the Schema Tag
Ctrl+= - Will Expand the Schema Tag

Here is the keyboard shortcuts for source editor

Ctrl+M,Ctrl+M - Will collapse the Code block, when you do the reverse
(again pressing the same Key-pairs) then it will get
expanded.

Thanks
__________________
J.Saravanan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-28-2007, 08:36 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Class Diagram

Num + ClassDiagram Expand

Shift+Alt+B Edit ExpandCollapseBaseTypeList

Ctrl+Del Edit Delete
Del Edit RemovefromDiagram
Enter View ViewCode
Shift+Alt+L Edit NavigateToLollipop
Num - ClassDiagram Collapse
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-29-2007, 11:04 PM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: Visual Studio Tips & Tricks

Hi there,

Here is some other project shortcut keys....

CTRL + N - File.NewFile

Displays the New File dialog box where you can select a new file to add to the current project.

CTRL + SHIFT + N - File.NewProject

Displays the New Project dialog box where you can create projects and add them to the current solution.

CTRL + O - File.OpenFile

Displays the Open File dialog box where you can select an existing file to open.

CTRL + SHIFT + O - File.OpenProject

Displays the Open Project dialog box where you can add existing projects to your solution.

CTRL + ALT + INSERT - Project.Override

Allows you to override base class methods in a derived class. Available for C#.
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-30-2007, 12:18 AM
smani smani is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 56
smani is on a distinguished road
Default Re: Visual Studio Tips & Tricks

hi
here i have some shortcuts:

CTRL+SHIFT+B--TO BULID SOLUTION

F5--TO RUN

SHIFT+F5--TO STOP RUNNING

SHIFT+F7--TOGGLES B/W DESIGN VIEW<--> CODE VIEW

IN ASPX PAGE


CTRL + F6
--TO MOVE FROM CODEBEHIND TO ASPX PAGE.

regards
Manivannan.s

Last edited by smani : 08-30-2007 at 12:22 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-31-2007, 01:27 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: Visual Studio Tips & Tricks

Friendz,

Here is some Window management shortcut keys...

SHIFT + ALT + ENTER - View.FullScreen
Toggles Full Screen mode on and off.
CTRL + - - View.NavigateBackward
Goes back to the previous document or window in the navigation history.
CTRL + SHIFT + - - View.NavigateForward
Moves forward to the document or window next in the navigation history.
ESC - Window.ActivateDocumentWindow
Closes a menu or dialog box, cancels an operation in progress, or places focus in the current document window.
CTRL + F4 - Window.CloseDocumentWindow
Closes the current MDI child window.

Learn with my posts...
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 09-01-2007, 12:18 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: Visual Studio Tips & Tricks

Here some other window management short keys....

SHIFT + ESC - Window.CloseToolWindow
Closes the current tool window.
CTRL + F2 - Window.MoveToDropDownBar
Moves the cursor to the drop-down bar while the editor is in Code view.
CTRL + F6
CTRL + TAB - Window.NextDocumentWindow
Cycles through the MDI child windows one window at a time.
ALT + F6 - Window.NextPane
Moves to the next tool window.
F6 - Window.NextSplitPane
Moves to the next pane of a split pane view of a single document.
Learn with my posts...
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 09-01-2007, 07:22 AM
SaravananJ SaravananJ is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 79
SaravananJ is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Hey

Here i have listed some HTML editor source view keyboard shortcuts

Ctrl+Shift+. - Auto close Tag override

Shift+F7 - View Designer

Ctrl+PgDn - Next View

Ctrl+PgUp - Previous Tab
__________________
J.Saravanan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 09-03-2007, 08:01 AM
SaravananJ SaravananJ is offline
D-Web Programmer
 
Join Date: Aug 2007
Posts: 79
SaravananJ is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Windows Forms Designer

End DocumentEnd

Shift+End DocumentEndExtend

Home DocumentStart

Shift+Home DocumentStartExtend
__________________
J.Saravanan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 09-07-2007, 08:48 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: Visual Studio Tips & Tricks

CTRL + PAGE DOWN - Window.NextTab

Moves to the next tab in the document or window.

CTRL + SHIFT + F6
CTRL + SHIFT + TAB
- Window.PreviousDocumentWindow

Moves to the previous document in the Editor or Designer.

SHIFT + ALT + F6 - Window.PreviousPane

Moves to the previously selected window.

SHIFT + F6 - Window.PreviousSplitPane

Moves to the previous pane of a document in split pane view.

CTRL + PAGE UP - Window.PreviousTab

Moves to the previous tab in the document or window.
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 09-08-2007, 05:40 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Global Keys - I

Ctrl+- View NavigateBackward
Ctrl+Shift+- View NavigateForward
Ctrl+. View ShowSmartTag
Ctrl+/ Tools GoToCommandLine
Ctrl+\, D View CodeDefinitionWindow
Ctrl+\, E View ErrorList
Ctrl+\, T View TaskList
Ctrl+Shift+1 View BrowseNext
Ctrl+Shift+2 View BrowsePrevious
Ctrl+Shift+7 View ForwardBrowseContext
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 09-08-2007, 05:45 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Global Keys - II

Ctrl+Shift+8 View PopBrowseContext
Ctrl+A Edit SelectAll
Ctrl+Alt+A View CommandWindow
Ctrl+Shift+A Project AddNewItem
Shift+Alt+A Project AddExistingItem
Ctrl+Alt+B Debug Breakpoints
Ctrl+B Debug BreakatFunction
Ctrl+Shift+B Build BuildSolution
Alt+Bkspce Edit Undo
Ctrl+Alt+Break Debug BreakAll
Ctrl+Break Build Cancel
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 09-08-2007, 05:54 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Global Keys - III

Ctrl+Alt+C Debug CallStack
Ctrl+Shift+C
View ClassView
Ctrl+Alt+D Debug Disassembly
Ctrl+D Edit GoToFindCombo
Shift+Alt+D
Data ShowDataSources
Shift+Del
Edit Cut
Ctrl+Alt+Down Arrow Window ShowEzMDIFileList
Down Arrow
Edit MoveControlDownGrid
Shift+Down Arrow
Edit SizeControlDownGrid
Ctrl+Alt+E Debug Exceptions
Ctrl+Shift+E
View ResourceView
Alt+Enter
Diagram Properties
Enter
Edit ShowTileGrid
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 09-08-2007, 06:00 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Global Keys - IV

Shift+Alt+Enter View FullScreen
Esc Window ActivateDocumentWindow
Shift+Esc Window CloseToolWindow
Ctrl+F
Edit Find
Ctrl+Shift+F Edit FindinFiles
Ctrl+Alt+F1 Help Contents
Ctrl+F1 Help HowDoI
F1
Help F1Help
Shift+F1 Help WindowHelp
Alt+F10
Debug ApplyCodeChanges
Ctrl+Alt+F10 Debug StepOverCurrentProcess
Ctrl+F10
Debug RunToCursor
Ctrl+Shift+F10
Debug SetNextStatement
F10
Debug StepOver
Alt+F11
Tools MacrosIDE
Ctrl+Alt+F11 Debug StepIntoCurrentProcess
Ctrl+F11 Debug ToggleDisassembly
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 09-08-2007, 06:03 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Global Keys - V

Ctrl+Shift+Alt+F11Debug StepOutCurrentProcess
F11
Debug StepInto
Shift+F11 Debug StepOut
Alt+F12
Edit FindSymbol
Ctrl+Alt+F12
View FindSymbolResults
Ctrl+F12
Edit GoToDeclaration
Ctrl+Shift+F12
View NextError
F12
Edit GoToDefinition
Shift+Alt+F12
Edit QuickFindSymbol
Shift+F12 Edit FindAllReferences
Ctrl+Alt+F2 Help Index
Ctrl+F2
Window MovetoNavigationBar
F2
View EditLabel
Alt+F3, S
Edit StopSearch
Ctrl+Alt+F3
Help Search
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 09-10-2007, 08:03 AM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Wink Re: Visual Studio Tips & Tricks

Hi buddies....

Here is some usefull TextEditors shortcut keys....

check it out...

CTRL + K, CTRL + D - Edit.FormatDocument

Applies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog box.

CTRL + K, CTRL + F - Edit.FormatSelection

Correctly indents the selected lines of code based on the surrounding lines of code.

CTRL + M, CTRL + H - Edit.HideSelection

Hides the selected text. A signal icon marks the location of the hidden text in the file.
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 09-11-2007, 03:49 AM
rrrajesh84in rrrajesh84in is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 399
rrrajesh84in is on a distinguished road
Default Re: Visual Studio Tips & Tricks

Global Keys - VI

Ctrl+F3Edit FindNextSelected
Ctrl+Shift+F3
Edit FindPreviousSelected
F3
Edit FindNext
Shift+Alt+F3Help SearchResults
Shift+F3
Edit FindPrevious
Ctrl+F4 Window CloseDocumentWindow
F4
View PropertiesWindow
Shift+F4
View PropertyPages
Alt+F5
Data StepInto
Ctrl+Alt+F5
Data Execute
Ctrl+F5
Debug StartWithoutDebugging
Ctrl+Shift+F5
Debug Restart
F5
Debug Start
Shift+Alt+F5
Debug StartWithApplicationVerifier
__________________
.....................................
''''''
Rajesh''''''
Ants. . . . . . Like me