My Place

Wednesday, December 17, 2008

Windows Shortcuts


Windows system key combinations

F1: Help
CTRL+ESC: Open Start menu
ALT+TAB: Switch between open programs
ALT+F4: Quit program
SHIFT+DELETE: Delete item permanently

Windows program key combinations
CTRL+C: Copy
CTRL+X: Cut
CTRL+V: Paste
CTRL+Z: Undo
CTRL+B: Bold
CTRL+U: Underline
CTRL+I: Italic

Mouse click/keyboard modifier combinations for shell objects
SHIFT+right click: Displays a shortcut menu containing alternative commands
SHIFT+double click: Runs the alternate default command (the second item on the menu)
ALT+double click: Displays properties
SHIFT+DELETE: Deletes an item immediately without placing it in the Recycle Bin

General keyboard-only commands
F1: Starts Windows Help
F10: Activates menu bar options
SHIFT+F10 Opens a shortcut menu for the selected item (this is the same as right-clicking an object
CTRL+ESC: Opens the Start menu (use the ARROW keys to select an item)
CTRL+ESC or ESC: Selects the Start button (press TAB to select the taskbar, or press SHIFT+F10 for a context menu)
ALT+DOWN ARROW: Opens a drop-down list box
ALT+TAB: Switch to another running program (hold down the ALT key and then press the TAB key to view the task-switching window)
SHIFT: Press and hold down the SHIFT key while you insert a CD-ROM to bypass the automatic-run feature
ALT+SPACE: Displays the main window's System menu (from the System menu, you can restore, move, resize, minimize, maximize, or close the window)
ALT+- (ALT+hyphen): Displays the Multiple Document Interface (MDI) child window's System menu (from the MDI child window's System menu, you can restore, move, resize, minimize, maximize, or close the child window)
CTRL+TAB: Switch to the next child window of a Multiple Document Interface (MDI) program
ALT+underlined letter in menu: Opens the menu
ALT+F4: Closes the current window
CTRL+F4: Closes the current Multiple Document Interface (MDI) window
ALT+F6: Switch between multiple windows in the same program (for example, when the Notepad Find dialog box is displayed, ALT+F6 switches between the Find dialog box and the main Notepad window)

Shell objects and general folder/Windows Explorer shortcuts
For a selected object:
F2: Rename object
F3: Find all files
CTRL+X: Cut
CTRL+C: Copy
CTRL+V: Paste
SHIFT+DELETE: Delete selection immediately, without moving the item to the Recycle Bin
ALT+ENTER: Open the properties for the selected object
To copy a file
Press and hold down the CTRL key while you drag the file to another folder.
To create a shortcut
Press and hold down CTRL+SHIFT while you drag a file to the desktop or a folder.

General folder/shortcut control
F4: Selects the Go To A Different Folder box and moves down the entries in the box (if the toolbar is active in Windows Explorer)
F5: Refreshes the current window.
F6: Moves among panes in Windows Explorer
CTRL+G: Opens the Go To Folder tool (in Windows 95 Windows Explorer only)
CTRL+Z: Undo the last command
CTRL+A: Select all the items in the current window
BACKSPACE: Switch to the parent folder
SHIFT+click+Close button: For folders, close the current folder plus all parent folders

Windows Explorer tree control
Numeric Keypad *: Expands everything under the current selection
Numeric Keypad +: Expands the current selection
Numeric Keypad -: Collapses the current selection.
RIGHT ARROW: Expands the current selection if it is not expanded, otherwise goes to the first child
LEFT ARROW: Collapses the current selection if it is expanded, otherwise goes to the parent

Properties control
CTRL+TAB/CTRL+SHIFT+TAB: Move through the property tabs

Accessibility shortcuts
Press SHIFT five times: Toggles StickyKeys on and off
Press down and hold the right SHIFT key for eight seconds: Toggles FilterKeys on and off
Press down and hold the NUM LOCK key for five seconds: Toggles ToggleKeys on and off
Left ALT+left SHIFT+NUM LOCK: Toggles MouseKeys on and off
Left ALT+left SHIFT+PRINT SCREEN: Toggles high contrast on and off

Microsoft Natural Keyboard keys
Windows Logo: Start menu
Windows Logo+R: Run dialog box
Windows Logo+M: Minimize all
SHIFT+Windows Logo+M: Undo minimize all
Windows Logo+F1: Help
Windows Logo+E: Windows Explorer
Windows Logo+F: Find files or folders
Windows Logo+D: Minimizes all open windows and displays the desktop
CTRL+Windows Logo+F: Find computer
CTRL+Windows Logo+TAB: Moves focus from Start, to the Quick Launch toolbar, to the system tray (use RIGHT ARROW or LEFT ARROW to move focus to items on the Quick Launch toolbar and the system tray)
Windows Logo+TAB: Cycle through taskbar buttons
Windows Logo+Break: System Properties dialog box
Application key: Displays a shortcut menu for the selected item

Microsoft Natural Keyboard with IntelliType software installed
Windows Logo+L: Log off Windows
Windows Logo+P: Starts Print Manager
Windows Logo+C: Opens Control Panel
Windows Logo+V: Starts Clipboard
Windows Logo+K: Opens Keyboard Properties dialog box
Windows Logo+I: Opens Mouse Properties dialog box
Windows Logo+A: Starts Accessibility Options (if installed)
Windows Logo+SPACEBAR: Displays the list of Microsoft IntelliType shortcut keys
Windows Logo+S: Toggles CAPS LOCK on and off

Dialog box keyboard commands
TAB: Move to the next control in the dialog box
SHIFT+TAB: Move to the previous control in the dialog box
SPACEBAR: If the current control is a button, this clicks the button. If the current control is a check box, this toggles the check box. If the current control is an option, this selects the option.
ENTER: Equivalent to clicking the selected button (the button with the outline)
ESC: Equivalent to clicking the Cancel button
ALT+underlined letter in dialog box item: Move to the corresponding item

Microsoft Visual Studio Shortcuts

Below is a list of the default shortcut keys for my VS.NET:

Action Key
View.ViewCode Global::F7
View.ViewDesigner Global::Shift+F7

Global::Alt+Enter
File.OpenFile Global::Ctrl+O
File.SaveSelectedItems Global::Ctrl+S
File.SaveAll Global::Ctrl+Shift+S
Edit.Cut Global::Ctrl+X
Global::Shift+Del
Edit.Copy Global::Ctrl+C
Global::Ctrl+Ins
Edit.Paste Global::Ctrl+V
Global::Shift+Ins
View.NavigateForward Global::Ctrl+Shift+-
Debug.Start Global::F5
Edit.FindinFiles Global::Ctrl+Shift+F
Edit.GoToFindCombo Global::Ctrl+D
View.SolutionExplorer Global::Ctrl+Alt+L
View.PropertiesWindow Global::F4
View.ObjectBrowser Global::Ctrl+Alt+J
View.Toolbox Global::Ctrl+Alt+X
File.NewProject Global::Ctrl+Shift+N
Edit.Undo Global::Ctrl+Z
Global::Alt+Bkspce
View.NextView HTML Editor HTML View::Ctrl+PgDn
HTML Editor Design View::Ctrl+PgDn
XML Editor Schema View::Ctrl+PgDn
XML Editor Data View::Ctrl+PgDn
View.VisibleBorders HTML Editor Design View::Ctrl+Q
View.Details HTML Editor Design View::Ctrl+Shift+Q
Project.Override Global::Ctrl+Alt+Ins
File.AddNewItem Global::Ctrl+Shift+A
File.AddExistingItem Global::Shift+Alt+A
Build.BuildSolution Global::Ctrl+Shift+B
Build.Cancel Global::Ctrl+Break
Build.Compile Global::Ctrl+F7
Debug.Breakpoints Global::Ctrl+Alt+B
Debug.RunningDocuments Global::Ctrl+Alt+N
Debug.Watch1 Global::Ctrl+Alt+W, 1
Debug.Watch2 Global::Ctrl+Alt+W, 2
Debug.Watch3 Global::Ctrl+Alt+W, 3
Debug.Watch4 Global::Ctrl+Alt+W, 4
Debug.Autos Global::Ctrl+Alt+V, A
Debug.Locals Global::Ctrl+Alt+V, L
Debug.This Global::Ctrl+Alt+V, T
Debug.Immediate Global::Ctrl+Alt+I
Debug.CallStack Global::Ctrl+Alt+C
Debug.Threads Global::Ctrl+Alt+H
Debug.Modules Global::Ctrl+Alt+U
Debug.Memory1 Global::Ctrl+Alt+M, 1
Debug.Memory2 Global::Ctrl+Alt+M, 2
Debug.Memory3 Global::Ctrl+Alt+M, 3
Debug.Memory4 Global::Ctrl+Alt+M, 4
Debug.Disassembly Global::Ctrl+Alt+D
Debug.Registers Global::Ctrl+Alt+G
Debug.ToggleDisassembly Global::Ctrl+F11
Debug.StartWithoutDebugging Global::Ctrl+F5
Debug.BreakAll Global::Ctrl+Alt+Break
Debug.StopDebugging Global::Shift+F5
Debug.Restart Global::Ctrl+Shift+F5
Debug.ApplyCodeChanges Global::Alt+F10
Debug.Exceptions Global::Ctrl+Alt+E
Debug.StepInto Global::F11
Debug.StepOver Global::F10
Debug.StepOut Global::Shift+F11
Debug.QuickWatch Global::Ctrl+Alt+Q
Global::Shift+F9
Debug.NewBreakpoint Global::Ctrl+B
Debug.ClearAllBreakpoints Global::Ctrl+Shift+F9
Database.Run Global::Ctrl+E
Database.RunSelection Global::Ctrl+Q
Database.StepInto Global::Alt+F5
Schema.Expand XML Editor Schema View::Ctrl+=
Schema.Collapse XML Editor Schema View::Ctrl+-
Query.Run Query Designer::Ctrl+R
View Designer::Ctrl+R
Format.Bold HTML Editor Design View::Ctrl+B
Format.Italic HTML Editor Design View::Ctrl+I
Format.Underline HTML Editor Design View::Ctrl+U
Format.ConverttoHyperlink HTML Editor Design View::Ctrl+L
Format.InsertBookmark HTML Editor Design View::Ctrl+Shift+L
Format.DecreaseIndent HTML Editor Design View::Ctrl+Shift+T
Format.IncreaseIndent HTML Editor Design View::Ctrl+T
Format.AlignLefts VC Dialog Editor::Ctrl+Shift+Left Arrow
Format.AlignCenters VC Dialog Editor::Shift+F9
Format.AlignRights VC Dialog Editor::Ctrl+Shift+Right Arrow
Format.AlignTops VC Dialog Editor::Ctrl+Shift+Up Arrow
Format.AlignMiddles VC Dialog Editor::F9
Format.AlignBottoms VC Dialog Editor::Ctrl+Shift+Down Arrow
Format.SpaceAcross VC Dialog Editor::Alt+Left Arrow
VC Dialog Editor::Alt+Right Arrow
Format.SpaceDown VC Dialog Editor::Alt+Down Arrow
VC Dialog Editor::Alt+Up Arrow
Format.ButtonRight VC Dialog Editor::Ctrl+R
Format.ButtonBottom VC Dialog Editor::Ctrl+B
Format.CenterVertical VC Dialog Editor::Ctrl+F9
Format.CenterHorizontal VC Dialog Editor::Ctrl+Shift+F9
Format.SizetoContent VC Dialog Editor::Shift+F7
Format.TabOrder VC Dialog Editor::Ctrl+D
Format.ShowGrid HTML Editor Design View::Ctrl+G
Format.SnaptoGrid HTML Editor Design View::Ctrl+Shift+G
Format.ToggleGuides VC Dialog Editor::Ctrl+G
Format.CheckMnemonics VC Dialog Editor::Ctrl+M
Format.TestDialog VC Dialog Editor::Ctrl+T
Format.LockElement HTML Editor Design View::Ctrl+Shift+K
Table.InsertColumntotheLeft HTML Editor Design View::Ctrl+Alt+Left Arrow
Table.InsertColumntotheRight HTML Editor Design View::Ctrl+Alt+Right Arrow
Table.InsertRowAbove HTML Editor Design View::Ctrl+Alt+Up Arrow
Table.InsertRowBelow HTML Editor Design View::Ctrl+Alt+Down Arrow
Tools.DebugProcesses Global::Ctrl+Alt+P
Image.FlipHorizontal VC Image Editor::Ctrl+H
Image.FlipVertical VC Image Editor::Shift+Alt+H
Image.Rotate90Degrees VC Image Editor::Ctrl+Shift+H
Image.UseSelectionasBrush VC Image Editor::Ctrl+U
Image.CopyAndOutlineSelection VC Image Editor::Ctrl+Shift+U
Image.DrawOpaque VC Image Editor::Ctrl+J
Image.NewImageType VC Image Editor::Ins
Image.RectangleSelectionTool VC Image Editor::Shift+Alt+S
Image.EraseTool VC Image Editor::Ctrl+Shift+I
Image.FillTool VC Image Editor::Ctrl+F
Image.MagnificationTool VC Image Editor::Ctrl+M
Image.PencilTool VC Image Editor::Ctrl+I
Image.BrushTool VC Image Editor::Ctrl+B
Image.AirbrushTool VC Image Editor::Ctrl+A
Image.LineTool VC Image Editor::Ctrl+L
Image.TextTool VC Image Editor::Ctrl+T
Image.RectangleTool VC Image Editor::Alt+R
Image.OutlinedRectangleTool VC Image Editor::Shift+Alt+R
Image.FilledRectangleTool VC Image Editor::Ctrl+Shift+Alt+R
Image.RoundedRectangleTool VC Image Editor::Alt+W
Image.OutlinedRoundedRectangleTool VC Image Editor::Shift+Alt+W
Image.FilledRoundedRectangleTool VC Image Editor::Ctrl+Shift+Alt+W
Image.EllipseTool VC Image Editor::Alt+P
Image.OutlinedEllipseTool VC Image Editor::Shift+Alt+P
Image.FilledEllipseTool VC Image Editor::Ctrl+Shift+Alt+P
Image.ShowTileGrid VC Image Editor::Ctrl+Shift+Alt+S
Image.ShowGrid VC Image Editor::Ctrl+Alt+S
Image.LargerBrush VC Image Editor::Ctrl+=
Image.SmallerBrush VC Image Editor::Ctrl+-
Image.SmallBrush VC Image Editor::Ctrl+.
Image.ZoomIn VC Image Editor::Ctrl+Up Arrow
VC Image Editor::Ctrl+Shift+.
Image.ZoomOut VC Image Editor::Ctrl+Down Arrow
VC Image Editor::Ctrl+Shift+,
Image.PreviousColor VC Image Editor::Ctrl+Left Arrow
VC Image Editor::Ctrl+[
Image.PreviousRightColor VC Image Editor::Ctrl+Shift+Left Arrow
VC Image Editor::Ctrl+Shift+[
Image.NextColor VC Image Editor::Ctrl+Right Arrow
VC Image Editor::Ctrl+]
Image.NextRightColor VC Image Editor::Ctrl+Shift+Right Arrow
VC Image Editor::Ctrl+Shift+]
Image.Magnify VC Image Editor::Ctrl+Shift+M
Help.DynamicHelp Global::Ctrl+F1
View.NavigateBackward Global::Ctrl+-
View.ClassView Global::Ctrl+Shift+C
View.ServerExplorer Global::Ctrl+Alt+S
View.ResourceView Global::Ctrl+Shift+E
View.MacroExplorer Global::Alt+F8
View.DocumentOutline Global::Ctrl+Alt+T
View.TaskList Global::Ctrl+Alt+K
View.CommandWindow Global::Ctrl+Alt+A
View.Output Global::Ctrl+Alt+O
View.FindSymbolResults Global::Ctrl+Alt+F12
View.Favorites Global::Ctrl+Alt+F
File.Print Global::Ctrl+P
Edit.Redo Global::Ctrl+Y
Global::Shift+Alt+Bkspce
Global::Ctrl+Shift+Z
Edit.SelectAll Global::Ctrl+A
Edit.Find Global::Ctrl+F
Edit.OpenFile Global::Ctrl+Shift+G
Tools.RunTemporaryMacro Global::Ctrl+Shift+P
Tools.RecordTemporaryMacro Global::Ctrl+Shift+R
Tools.MacrosIDE Global::Alt+F11
File.OpenProject Global::Ctrl+Shift+O
File.NewFile Global::Ctrl+N
Edit.Replace Global::Ctrl+H
Edit.GoTo Global::Ctrl+G
View.PropertyPages Global::Shift+F4
View.FullScreen Global::Shift+Alt+Enter
Debug.RunToCursor Global::Ctrl+F10
Debug.ToggleBreakpoint Global::F9
Help.Contents Global::Ctrl+Alt+F1
Help.Index Global::Ctrl+Alt+F2
Debug.SetNextStatement Global::Ctrl+Shift+F10
Help.Search Global::Ctrl+Alt+F3
Debug.ShowNextStatement Global::Alt+Num *
Help.Searchresults Global::Shift+Alt+F3
Help.Indexresults Global::Shift+Alt+F2
Edit.Wildcard Global::Alt+F3, P
Edit.ReplaceinFiles Global::Ctrl+Shift+H

Global::Ctrl+5
Edit.GotoNextLocation Global::F8
Edit.GotoPreviousLocation Global::Shift+F8

Global::Ctrl+6
Window.NextTab Global::Ctrl+PgDn
Window.PreviousTab Global::Ctrl+PgUp
HTML Editor HTML View::Ctrl+PgUp
Window.CloseToolWindow Global::Shift+Esc

Global::Ctrl+7
Window.ActivateDocumentWindow Global::Esc
Window.MovetoDropdownBar Global::Ctrl+F2
Window.NextPane Global::Alt+F6
Window.PreviousPane Global::Shift+Alt+F6

Global::Ctrl+Shift+Alt+T

Global::F2
Edit.HiddenText Global::Alt+F3, H
Edit.MatchCase Global::Alt+F3, C
Edit.WholeWord Global::Alt+F3, W
Edit.RegularExpression Global::Alt+F3, R
Edit.Up Global::Alt+F3, B
Edit.StopSearch Global::Alt+F3, S
View.NextTask Global::Ctrl+Shift+F12
Edit.FindNext Global::F3
Edit.FindPrevious Global::Shift+F3
Edit.FindNextSelected Global::Ctrl+F3
Edit.FindPreviousSelected Global::Ctrl+Shift+F3
Debug.EnableBreakpoint Global::Ctrl+F9
Help.F1Help Global::F1
Tools.GoToCommandLine Global::Ctrl+/
Window.NextSplitPane Global::F6
Window.PreviousSplitPane Global::Shift+F6
Window.NextDocumentWindow Global::Ctrl+F6
Global::Ctrl+Tab
Window.PreviousDocumentWindow Global::Ctrl+Shift+F6
Global::Ctrl+Shift+Tab
Edit.CycleClipboardRing Global::Ctrl+Shift+V
Global::Ctrl+Shift+Ins
Window.CloseDocumentWindow Global::Ctrl+F4
Tools.CommandWindowMarkMode Global::Ctrl+Shift+M
Edit.GoToDefinition Global::F12
Edit.GoToDeclaration Global::Ctrl+F12
View.ObjectBrowserBack Global::Alt+-
View.ObjectBrowserForward Global::Shift+Alt+-
Edit.FindSymbol Global::Alt+F12
Help.WindowHelp Global::Shift+F1
View.PopBrowseContext Global::Ctrl+Shift+8
Edit.GoToReference Global::Shift+F12
View.BrowseNext Global::Ctrl+Shift+1
View.BrowsePrevious Global::Ctrl+Shift+2
Edit.QuickFindSymbol Global::Shift+Alt+F12
Edit.MoveControlLeft Global::Ctrl+Left Arrow
VC Dialog Editor::Left Arrow
Windows Forms Designer::Ctrl+Left Arrow
Edit.MoveControlDown Global::Ctrl+Down Arrow
VC Dialog Editor::Down Arrow
Windows Forms Designer::Ctrl+Down Arrow
Edit.MoveControlRight Global::Ctrl+Right Arrow
VC Dialog Editor::Right Arrow
Windows Forms Designer::Ctrl+Right Arrow
Edit.MoveControlUp Global::Ctrl+Up Arrow
VC Dialog Editor::Up Arrow
Windows Forms Designer::Ctrl+Up Arrow
Edit.SizeControlDown Global::Ctrl+Shift+Down Arrow
VC Dialog Editor::Shift+Down Arrow
Windows Forms Designer::Ctrl+Shift+Down Arrow
Edit.SizeControlUp Global::Ctrl+Shift+Up Arrow
VC Dialog Editor::Shift+Up Arrow
Windows Forms Designer::Ctrl+Shift+Up Arrow
Edit.SizeControlLeft Global::Ctrl+Shift+Left Arrow
VC Dialog Editor::Shift+Left Arrow
Windows Forms Designer::Ctrl+Shift+Left Arrow
Edit.SizeControlRight Global::Ctrl+Shift+Right Arrow
VC Dialog Editor::Shift+Right Arrow
Windows Forms Designer::Ctrl+Shift+Right Arrow
Edit.ShowTileGrid Global::Enter
Edit.MoveControlUpGrid Global::Up Arrow
Edit.MoveControlDownGrid Global::Down Arrow
Edit.MoveControlLeftGrid Global::Left Arrow
Edit.MoveControlRightGrid Global::Right Arrow
Edit.SizeControlRightGrid Global::Shift+Right Arrow
Edit.SizeControlUpGrid Global::Shift+Up Arrow
Edit.SizeControlLeftGrid Global::Shift+Left Arrow
Edit.SizeControlDownGrid Global::Shift+Down Arrow
Edit.SelectNextControl Global::Tab
Edit.SelectPreviousControl Global::Shift+Tab

Global::Alt+F9, D

Global::Alt+F9, P

Global::Alt+F9, S

Global::Alt+F9, A
View.ShowWebBrowser Global::Ctrl+Alt+R
View.WebNavigateBack WebBrowser::Alt+Left Arrow
View.WebNavigateForward WebBrowser::Alt+Right Arrow
Help.Nexttopic WebBrowser::Alt+Down Arrow
Help.Previoustopic WebBrowser::Alt+Up Arrow
Edit.Delete Global::Del
Edit.DeleteBackwards Text Editor::Shift+Bkspce
Text Editor::Bkspce
Edit.BreakLine Text Editor::Shift+Enter
Text Editor::Enter
Windows Forms Designer::Enter
Edit.InsertTab Text Editor::Tab
Windows Forms Designer::Tab
Edit.TabLeft Text Editor::Shift+Tab
Windows Forms Designer::Shift+Tab
Edit.CharLeft Text Editor::Left Arrow
Windows Forms Designer::Left Arrow
Edit.CharLeftExtend Text Editor::Shift+Left Arrow
Windows Forms Designer::Shift+Left Arrow
Edit.CharRight Text Editor::Right Arrow
Windows Forms Designer::Right Arrow
Edit.CharRightExtend Text Editor::Shift+Right Arrow
Windows Forms Designer::Shift+Right Arrow
Edit.LineUp Text Editor::Up Arrow
Windows Forms Designer::Up Arrow
Edit.LineUpExtend Text Editor::Shift+Up Arrow
Windows Forms Designer::Shift+Down Arrow
Edit.LineDown Text Editor::Down Arrow
Windows Forms Designer::Down Arrow
Edit.LineDownExtend Text Editor::Shift+Down Arrow
Windows Forms Designer::Shift+Up Arrow
Edit.DocumentStart Text Editor::Ctrl+Home
Edit.DocumentStartExtend Text Editor::Ctrl+Shift+Home
Edit.DocumentEnd Text Editor::Ctrl+End
Edit.DocumentEndExtend Text Editor::Ctrl+Shift+End
Edit.LineStart Text Editor::Home
Edit.LineStartExtend Text Editor::Shift+Home
Edit.LineEnd Text Editor::End
Edit.LineEndExtend Text Editor::Shift+End
Edit.PageUp Text Editor::PgUp
Edit.PageUpExtend Text Editor::Shift+PgUp
Edit.PageDown Text Editor::PgDn
Edit.PageDownExtend Text Editor::Shift+PgDn
Edit.ViewTop Text Editor::Ctrl+PgUp
Edit.ViewTopExtend Text Editor::Ctrl+Shift+PgUp
Edit.ViewBottom Text Editor::Ctrl+PgDn
Edit.ViewBottomExtend Text Editor::Ctrl+Shift+PgDn
Edit.ScrollLineUp Text Editor::Ctrl+Up Arrow
VC Dialog Editor::Ctrl+Up Arrow
Edit.ScrollLineDown Text Editor::Ctrl+Down Arrow
VC Dialog Editor::Ctrl+Down Arrow
Edit.MakeLowercase Text Editor::Ctrl+U
Edit.MakeUppercase Text Editor::Ctrl+Shift+U
Edit.SwapAnchor Text Editor::Ctrl+R, Ctrl+P
Edit.GotoBrace Text Editor::Ctrl+]
Edit.GotoBraceExtend Text Editor::Ctrl+Shift+]
Edit.OvertypeMode Text Editor::Ins
Edit.LineCut Text Editor::Ctrl+L
Edit.LineDelete Text Editor::Ctrl+Shift+L
Edit.DeleteHorizontalWhiteSpace Text Editor::Ctrl+K, Ctrl+\
Edit.LineOpenAbove Text Editor::Ctrl+Enter
Edit.LineOpenBelow Text Editor::Ctrl+Shift+Enter
Edit.ClearBookmarks Text Editor::Ctrl+K, Ctrl+L
Edit.ToggleBookmark Text Editor::Ctrl+K, Ctrl+K
Edit.NextBookmark Text Editor::Ctrl+K, Ctrl+N
Edit.PreviousBookmark Text Editor::Ctrl+K, Ctrl+P
Edit.CharTranspose Text Editor::Ctrl+T
Edit.WordTranspose Text Editor::Ctrl+Shift+T
Edit.LineTranspose Text Editor::Shift+Alt+T
Edit.SelectCurrentWord Text Editor::Ctrl+W
Edit.WordDeleteToEnd Text Editor::Ctrl+Del
Edit.WordDeleteToStart Text Editor::Ctrl+Bkspce
Edit.WordPrevious Text Editor::Ctrl+Left Arrow
Edit.WordPreviousExtend Text Editor::Ctrl+Shift+Left Arrow
Edit.WordNext Text Editor::Ctrl+Right Arrow
Edit.WordNextExtend Text Editor::Ctrl+Shift+Right Arrow
Edit.SelectionCancel Text Editor::Esc
Windows Forms Designer::Esc
Edit.ParameterInfo Text Editor::Ctrl+Shift+Space
Edit.ViewWhiteSpace Text Editor::Ctrl+R, Ctrl+W
Edit.CompleteWord Text Editor::Alt+Right Arrow
Text Editor::Ctrl+Space
Edit.ListMembers Text Editor::Ctrl+J
Edit.FormatSelection Text Editor::Ctrl+K, Ctrl+F
Edit.ToggleTaskListShortcut Text Editor::Ctrl+K, Ctrl+H
Edit.QuickInfo Text Editor::Ctrl+K, Ctrl+I
Edit.CharLeftExtendColumn Text Editor::Shift+Alt+Left Arrow
Edit.CharRightExtendColumn Text Editor::Shift+Alt+Right Arrow
Edit.LineUpExtendColumn Text Editor::Shift+Alt+Up Arrow
Edit.LineDownExtendColumn Text Editor::Shift+Alt+Down Arrow
Edit.ToggleWordWrap Text Editor::Ctrl+R, Ctrl+R
Edit.IncrementalSearch Text Editor::Ctrl+I
Edit.ReverseIncrementalSearch Text Editor::Ctrl+Shift+I
Edit.LineStartExtendColumn Text Editor::Shift+Alt+Home
Edit.LineEndExtendColumn Text Editor::Shift+Alt+End
Edit.WordPreviousExtendColumn Text Editor::Ctrl+Shift+Alt+Left Arrow
Edit.WordNextExtendColumn Text Editor::Ctrl+Shift+Alt+Right Arrow
Edit.HideSelection Text Editor::Ctrl+M, Ctrl+H
Edit.ToggleOutliningExpansion Text Editor::Ctrl+M, Ctrl+M
Edit.ToggleAllOutlining Text Editor::Ctrl+M, Ctrl+L
Edit.StopOutlining Text Editor::Ctrl+M, Ctrl+P
Edit.StopHidingCurrent Text Editor::Ctrl+M, Ctrl+U
Edit.CollapsetoDefinitions Text Editor::Ctrl+M, Ctrl+O
Edit.CommentSelection Text Editor::Ctrl+K, Ctrl+C
Edit.UncommentSelection Text Editor::Ctrl+K, Ctrl+U
Edit.SelectToLastGoBack Text Editor::Ctrl+=
Edit.FormatDocument Text Editor::Ctrl+K, Ctrl+D

HTML Editor HTML View::Ctrl+Shift+.
Edit.ScrollColumnLeft VC Dialog Editor::Ctrl+Left Arrow
Edit.ScrollColumnRight VC Dialog Editor::Ctrl+Right Arrow
Edit.NewString VC String Editor::Ins
Edit.NewAccelerator VC Accelerator Editor::Ins
Edit.NextKeyTyped VC Accelerator Editor::Ctrl+W
View.SQL Query Designer::Ctrl+3
View Designer::Ctrl+3
View.Diagram Query Designer::Ctrl+1
View Designer::Ctrl+1
View.Results Query Designer::Ctrl+4
View Designer::Ctrl+4
View.Grid Query Designer::Ctrl+2
View Designer::Ctrl+2

Windows Forms Designer::Shift+Esc

Wednesday, December 03, 2008

come back

Its been a while i posted here. I will force myself to post as much as possible.

Recently i tried using google's new browser Google chrome. Believe me its really ROCKING... It's very fast, provides lots of space to browse then internet (less space in tool bars & status bars).

Also excited to see IE8. waiting for new version to be released.

Tuesday, August 30, 2005

Best Practices for Handling Exceptions

A well-designed set of error handling code blocks can make a program more robust and less prone to crashing because the application handles such errors. The following list contains suggestions on best practices for handling exceptions:
Know when to set up a try/catch block. For example, you can programmatically check for a condition that is likely to occur without using exception handling. In other situations, using exception handling to catch an error condition is appropriate.
The following example uses an if statement to check whether a connection is closed. You can use this method instead of throwing an exception if the connection is not closed. [Visual Basic]
If conn.State <> ConnectionState.Closed Then
conn.Close()
End If
[C#]
if(conn.State != ConnectionState.Closed)
conn.Close();
In the following example, an exception is thrown if the connection is not closed. [Visual Basic]
Try
conn.Close()
Catch ex As InvalidOperationException
'Do something with the error or ignore it.
End Try
[C#]
try {
conn.Close();
}
catch(InvalidOperationException ex) {
//Do something with the error or ignore it.
}
The method you choose depends on how often you expect the event to occur. If the event is truly exceptional and is an error (such as an unexpected end-of-file), using exception handling is better because less code is executed in the normal case. If the event happens routinely, using the programmatic method to check for errors is better. In this case, if an exception occurs, the exception will take longer to handle.
Use try/finally blocks around code that can potentially generate an exception and centralize your catch statements in one location. In this way, the try statement generates the exception, the finally statement closes or deallocates resources, and the catch statement handles the exception from a central location.
Always order exceptions in catch blocks from the most specific to the least specific. This technique handles the specific exception before it is passed to a more general catch block.
End exception class names with the word "Exception". For example: [Visual Basic]
Public Class EmployeeListNotFoundException
Inherits Exception
[C#]
public class MyFileNotFoundException : ApplicationException {
}
When creating user-defined exceptions, you must ensure that the metadata for the exceptions is available to code executing remotely, including when exceptions occur across application domains. For example, suppose Application Domain A creates Application Domain B, which executes code that throws an exception. For Application Domain A to properly catch and handle the exception, it must be able to find the assembly containing the exception thrown by Application Domain B. If Application Domain B throws an exception that is contained in an assembly under its application base, but not under Application Domain A's application base, Application Domain A will not be able to find the exception and the common language runtime will throw a FileNotFoundException. To avoid this situation, you can deploy the assembly containing the exception information in two ways:
Put the assembly into a common application base shared by both application domains
- or -
If the domains do not share a common application base, sign the assembly containing the exception information with a strong name and deploy the assembly into the global assembly cache.
In C# and the Managed Extensions for C++, use at least the three common constructors when creating your own exception classes. For an example, see Using User-Defined Exceptions.
In most cases, use the predefined exceptions types. Define new exception types only for programmatic scenarios. Introduce a new exception class to enable a programmer to take a different action in code based on the exception class.
Do not derive user-defined exceptions from the Exception base class. For most applications, derive custom exceptions from the ApplicationException class.
Include a localized description string in every exception. When the user sees an error message, it is derived from the description string of the exception that was thrown, rather than from the exception class.
Use grammatically correct error messages, including ending punctuation. Each sentence in a description string of an exception should end in a period.
Provide Exception properties for programmatic access. Include extra information in an exception (in addition to the description string) only when there is a programmatic scenario where the additional information is useful.
Return null for extremely common error cases. For example, File.Open returns null if the file is not found, but throws an exception if the file is locked.
Design classes so that an exception is never thrown in normal use. For example, a FileStream class exposes another way of determining whether the end of the file has been reached. This avoids the exception that is thrown if you read past the end of the file. The following example shows how to read to the end of the file. [Visual Basic]
Class FileRead
Sub Open()
Dim stream As FileStream = File.Open("myfile.txt", FileMode.Open)
Dim b As Byte

' ReadByte returns -1 at EOF.
While b = stream.ReadByte() <> True
' Do something.
End While
End Sub
End Class
[C#]
class FileRead {
void Open() {
FileStream stream = File.Open("myfile.txt", FileMode.Open);
byte b;
// ReadByte returns -1 at EOF.
while ((b == stream.ReadByte()) != true) {
// Do something.
}
}
}
Throw an InvalidOperationException if a property set or method call is not appropriate given the object's current state.
Throw an ArgumentException or a class derived from ArgumentException if invalid parameters are passed.
The stack trace begins at the statement where the exception is thrown and ends at the catch statement that catches the exception. Be aware of this fact when deciding where to place a throw statement.
Use exception builder methods. It is common for a class to throw the same exception from different places in its implementation. To avoid excessive code, use helper methods that create the exception and return it. For example: [Visual Basic]
Class File
Private fileName As String

Public Function Read(bytes As Integer) As Byte()
If Not ReadFile(handle, bytes) Then
Throw NewFileIOException()
End If
End Function 'Read

Function NewFileIOException() As FileException
Dim description As String = __unknown ' Build localized string, including fileName.
Return New FileException(description) '
End Function 'NewFileIOException
End Class 'File
[C#]
class File {
string fileName;
public byte[] Read(int bytes) {
if (!ReadFile(handle, bytes))
throw NewFileIOException();
}
FileException NewFileIOException() {
string description = // Build localized string, including fileName.
return new FileException(description);
}
}
Alternatively, use the exception's constructor to build the exception. This is more appropriate for global exception classes, such as ArgumentException.
Throw exceptions instead of returning an error code or HRESULT.
Clean up intermediate results when throwing an exception. Callers should be able assume that there are no side effects when an exception is thrown from a method.


Keep smiling