Wednesday, January 9, 2008

keyboard shorcuts

Auto html format/indent in Visual Studio .NET

Auto html format or indent
For example, let's say I paste this HTML into VS.NET "source"view: I'd like to issue a command to VS to have it reformat this source and change it. Try this : "Tools", "Options", scroll to "Text Editor", and then "HTML","Miscellaneous", select "Format HTML on Paste".That does exactly what you want. Simply press:Control + K AND Control + D....and the code will be auto-formatted. This works in HTML and in code(VB/C#) windows

1 comments

Labels: keybord shorcuts, visual studio


Visual Studio shortcut keys

[-]



Visual Studio shortcut keys



Visual Studio
shortcut keys Understanding Code: Exploring the .NET framework’s Class
Relationships The dynamic class diagram is a great way of exploring class relationships
in ­­the .NET framework. Now I’m sure most people will already be using
the class diagram for their own class hierarchies (Add a class diagram, go to class
view [Ctrl-W, Ctrl-C], and drag a class to the diagram), but did
you know that you can also use a class diagram as a great way of getting familiar
with the .NET framework in VS2005? In class view, open the “Project References”
tree and drag a namespace to the class diagram (e.g. System.IO). Also, don’t forget
you can “Show Derived classes” by right-clicking on a class. Navigating Code You
are probably aware of the right-click ‘Go to Definition” navigation (with your cursor
placed in a symbol). It is also bound to F12. What you might not be aware of is
its counterpart, Shift-F12 which shows all references to the symbol defined at the
current cursor location. F12 - Go to symbol definition Shift-F12
- Show all references to a symbol The F8 key is a great shortcut
key to remember. It can cycle through all references found with F12,
and in addition it can cycle through any ‘List’ output window, such as the task
list, error list, etc. F8 - Cycle through list of items in the
currently active output window Shift-F8 - Same as F8 but in the
opposite direction The next two key ‘chords’ are very useful when you are dealing
with unfamiliar code, as they provide a high level view of a class’s methods:
Ctrl-M, Ctrl-O - Collapses all methods to outline view Ctrl-M, Ctrl-M
- Collapses/expands the method the cursor is currently in. Most people are aware
of the “IE style navigation” using Ctrl-minus and Ctrl-Shift-minus to move backwards
and forwards through visited code: Ctrl-‘-‘ - Move backwards to
previous cursor location Ctrl-Shift-‘-‘ - Move forwards to last
cursor location But the following two are less well known (and in many instances,
more useful). If you are navigating a sequence of method calls, and you move around
in the surrounding code, the IE style navigation will cycle through every location
the cursor was placed. The following two commands move up and down the “Definition
Navigation Stack”, so just those methods that you delved into using F12: Ctrl-Shift-8
- Move up the definition navigation stack (stack pop) Ctrl-Shift-7
- Move down the definition navigation stack (stack push) Another less known shortcut
is Ctrl-I which activates incremental search. Open a source file,
hit Ctrl-I and start typing the first few letters of your search
text. Visual Studio will go to the first occurrence and continuing searching as
you enter more characters. Hit Ctrl-I to go to the next occurrence
(and of course, Ctrl-Shift-I to go to the previous). Pressing Escape
will turn off incremental search. Ctrl-Shift-I - Incremental search
Ctrl-Shift-F - Find in all files (more useful than Ctrl-F)
Ctrl-H - Replace Another tip involves finding files. You can download
a free add-in called VS File Finder from the following link: http://www.zero-one-zero.com/vs.
It’s easy to use and good for navigating in large solutions. File Finder shows up
as a new window after you install it from the .msi file. I docked mine with the
output and list panels at the bottom of the IDE window. Any text you enter in the
textbox will filter the list of files displayed by partial file name matches. For
some reason, I always seem to forget these two shortcuts: F7 -
Switch to code view Shift-F7 - Switch to design view Modifying
Code Ctrl-K, Ctrl-C - Comment out currently selected code Ctrl-K,
Ctrl-U - Uncomment currently selected code Ctrl-K, Ctrl-F
- Auto format selected code FxCop is a Static Analysis tool that can not only help
you come to terms with an unfamiliar code base (see previous post) but also to improve
existing code. FxCop runs over the IL generated from your source code and performs
a set of rule based comparisons on it. There are 2 rule sets that can help with
refactoring: naming and maintainability. One of the rules that can generate warnings
relates to something called ‘cyclomatic complexity’. Cyclomatic complexity is just
the number of branches in a method. The higher the value, the greater the likelihood
that a method could be reduced by having sections of code extracted into new methods
(refactored). Visual Studio 2005 contains a number of refactoring commands to help
you reorganise code: Ctrl-R, Ctrl-M - Extract method Ctrl-R,
Ctrl-E - Encapsulate field Ctrl-R, Ctrl-I - Extract
Interface F2 - Rename [Ctrl-R is the first ‘note’
in most refactoring key combinations, and there are other refactoring commands in
addition to those I've listed above] Debugging Code These are essential debugging
shortcuts: F10 – Step over Ctrl-F10 – Run to cursor
F11 – Step into Shift-F11 – Step out F9
– Toggle a breakpoint F5 – Run with debugging Shift-F5
– Stop debugging Control-F5 – Run without debugging Attributes
can make your debugging more effective by declaratively altering the behaviour of
the debugger: [DebuggerStepThrough()] is used to decorate a method or property to
prevent the debugger stepping into it whilst debugging. [DebuggerDisplay(“{propertyname}”)]
allows you to define the value which is displayed by default in debugger visualisers.
[DebuggerBrowsable(DebuggerBrowsableState.Never)] can be used to prevent the display
of data, such as private fields, in visualisers. In order to use the debugger attributes
you will need to import the System.Diagnostics namespace. You can find out more
about debugger attributes here: Enhancing Debugging with the Debugger Display Attributes.
One final debugging tip: you can hold down control key when drilling into a visualiser
to make it transparent while you inspect the code beneath it.



0 comments

Labels: keybord shorcuts, visual studio


Saturday, November 17, 2007
KeyBoard Shortcuts XP
Getting used to using your keyboard exclusively and leaving your mouse behind will make you much more efficient at performing any task on any Windows system. I use the following keyboard shortcuts every day:
Windows key + R = Run menu
This is usually followed by:cmd = Command Promptiexplore + "web address" = Internet Explorercompmgmt.msc = Computer Managementdhcpmgmt.msc = DHCP Managementdnsmgmt.msc = DNS Managementservices.msc = Serviceseventvwr = Event Viewerdsa.msc = Active Directory Users and Computersdssite.msc = Active Directory Sites and ServicesWindows key + E = Explorer
ALT + Tab = Switch between windows
ALT, Space, X = Maximize window
CTRL + Shift + Esc = Task Manager
Windows key + Break = System properties
Windows key + F = Search
Windows key + D = Hide/Display all windows
CTRL + C = copy
CTRL + X = cut
CTRL + V = paste
Also don't forget about the "Right-click" key next to the right Windows key on your keyboard. Using the arrows and that key can get just about anything done once you've opened up any program.
Keyboard Shortcuts
[Alt] and [Esc] Switch between running applications
[Alt] and letter Select menu item by underlined letter
[Ctrl] and [Esc] Open Program Menu
[Ctrl] and [F4] Close active document or group windows (does not work with some applications)
[Alt] and [F4] Quit active application or close current window
[Alt] and [-] Open Control menu for active document
Ctrl] Lft., Rt. arrow Move cursor forward or back one word
Ctrl] Up, Down arrow Move cursor forward or back one paragraph
[F1] Open Help for active application
Windows+M Minimize all open windows
Shift+Windows+M Undo minimize all open windows
Windows+F1 Open Windows Help
Windows+Tab Cycle through the Taskbar buttons
Windows+Break Open the System Properties dialog box

acessability shortcuts
Right SHIFT for eight seconds........ Switch FilterKeys on and off.
Left ALT +left SHIFT +PRINT SCREEN....... Switch High Contrast on and off.
Left ALT +left SHIFT +NUM LOCK....... Switch MouseKeys on and off.
SHIFT....... five times Switch StickyKeys on and off.
NUM LOCK...... for five seconds Switch ToggleKeys on and off.
explorer shortcuts
END....... Display the bottom of the active window.
HOME....... Display the top of the active window.
NUM LOCK+ASTERISK....... on numeric keypad (*) Display all subfolders under the selected folder.
NUM LOCK+PLUS SIGN....... on numeric keypad (+) Display the contents of the selected folder.
NUM LOCK+MINUS SIGN....... on numeric keypad (-) Collapse the selected folder.
LEFT ARROW...... Collapse current selection if it's expanded, or select parent folder.
RIGHT ARROW....... Display current selection if it's collapsed, or select first subfolder.

Type the following commands in your Run Box (Windows Key + R) or Start Run
devmgmt.msc = Device Managermsinfo32 = System Informationcleanmgr = Disk Cleanupntbackup = Backup or Restore Wizard (Windows Backup Utility)mmc = Microsoft Management Consoleexcel = Microsoft Excel (If Installed)msaccess = Microsoft Access (If Installed)powerpnt = Microsoft PowerPoint (If Installed)winword = Microsoft Word (If Installed)frontpg = Microsoft FrontPage (If Installed)notepad = Notepadwordpad = WordPadcalc = Calculatormsmsgs = Windows Messengermspaint = Microsoft Paintwmplayer = Windows Media Playerrstrui = System Restorenetscp6 = Netscape 6.xnetscp = Netscape 7.xnetscape = Netscape 4.xwaol = America Onlinecontrol = Opens the Control Panelcontrol printers = Opens the Printers Dialog
internetbrowser
type in u're adress "google", then press [Right CTRL] and [Enter]add www. and .com to word and go to it

No comments :