Tuesday, November 29, 2011

31 Windows Shortcuts


  1. Component Services – comexp.msc
  2. Computer Management – compmgmt.msc
  3. Device Manager – devmgmt.msc
  4. Disk Defrag – dfrg.msc
  5. Disk Managment – diskmgmt.msc
  6. Event Viewer – eventvwr.msc
  7. Group Policies – gpedit.msc
  8. Local Security Settings – secpol.msc
  9. Local Users and Groups – lusrmgr.msc
  10. Performance Monitor – perfmon.msc
  11. Resultant Set of Policies – rsop.msc
  12. Services – services.msc
  13. Shared Folders – fsmgmt.msc
  14. access.cpl - Accessibility controls Keyboard(1), Sound(2), Display(3), Mouse(4), General(5) 
  15. appwiz.cpl - Add/Remove Programs  
  16. desk.cpl - Display properties  Themes(5), Desktop(0), Screen Saver(1), Appearance (2), Settings(3)
  17. hdwwiz.cpl - Add hardware   
  18. inetcpl.cpl - Configure Internet Explorer and Internet properties  General(0), Security(1), Privacy(2), Content(3), Connections(4), Programs(5), Advanced(6) 
  19. intl.cpl - Regional settings  Regional Options(1), Languages(2), Advanced(3) 
  20. joy.cpl - Game controllers   
  21. main.cpl - Mouse properties and settings  Buttons(0), Pointers(1), Pointer Options(2), Wheel(3), Hardware(4) 
  22. main.cpl,@1  Keyboard properties  Speed(0), Hardware (1) 
  23. mmsys.cpl Sounds and Audio  Volume(0), Sounds(1), Audio(2), Voice(3), Hardware(4) 
  24. ncpa.cpl Network properties   
  25. nusrmgr.cpl User accounts   
  26. powercfg.cpl Power configuration  Power Schemes, Advanced, Hibernate, UPS (Tabs not indexed) 
  27. sysdm.cpl System properties General(0), Computer Name(1), Hardware(2), Advanced(3), System Restore(4), Automatic Updates(5), Remote (6) 
  28. telephon.cpl Phone and modem options  Dialing Rules(0), Modems(1), Advanced(2)
  29. timedate.cpl Date and time properties  Date & Time(0), Time Zone(1), Internet Time (no index) 
  30. sc create [service name] - to add
  31. sc delete [service name] - to delete

Thursday, September 1, 2011

Catch the Bug - 1

After a long time, I am restarting this blog.

Today I am introducing a programming bug.
Look at the pseudo code below.

unsigned long uCount;
unsigned long uMaxVal;

....
....

//uMaxVal assigned some unsigned value here
....

for(uCount = 0; uCount < uMaxVal -1; uCount++)
{

 //Do whatever
}


Do you find anything wrong on seeing this simple statements? You thinks the loop will terminates when the uCount value reaches the uMaxVal.


What if uMaxVal value is 0.

You simply says the program control will not enter in to the for loop. But it is false.

What is the value of (nMaxVal -1) when nMaxVal is equals to zero.

If you Answer '-1' it is Wrong.

Since it is a Unsigned Long value, it does not return -1, instead it returns the maximum value of the long datatype. For a 32 bit compiler it returns '4294967295' as a results. So the program control enters into the for loop and it iterates until uCount reaches the maximum value.

So, beware of using unsigned values.

This is not an infinte loop bug, it terminates once the max value  but the behavior of the program is undefined.

Wednesday, June 29, 2011

Visual Studio 2010 IDE Hangs when menu items are activated

Sometimes, When mouse over the main menu items (File, Edit, View … Window or Help), the IDE hangs. Sometimes, when clicking on the menu item it will highlight or turn completely black.

The same happens when using the keyboard. Alt+F highlights the File menu. Sometimes (after a few seconds) the region that should display the menu will be drawn in a solid color, but the menu is not populated.

On rare occasion (when using the mouse), the menu will populate, but when hovering over a sub-menu item, the item blinks – or is completely erased.


Environment:
I just upgraded from XP to Win7 Enterprise. Installed VS 2010 Premium and SP1.

Attempted Resolution:
devenv.exe /safemode – It happens when VS is running in Safe Mode also.
I have disable Aero – still happens.
Disabled Hardware acceleration via registry: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\DisableHWAcceleration
Have uninstalled and reinstalled Visual Studio and the service pack.

Visual Studio worked properly when I booted the machine in safe mode. (So I assumed there were some conflicts with in one of the many drivers I installed.)

While in Windows -Safe Mode-, I went to Tools->Options. On the options window, under Environment: General I changed the 'Visual experience' settings. I unchecked "Automatically adjust visual experience based on client performance", "Enable rich client visual experience" & "Use hardware graphics acceleration if available".

With these settings, the IDE works perfectly!

Problem resolved.

More info at https://connect.microsoft.com/VisualStudio/feedback/details/675328/vs2010-ide-hangs-when-menu-items-are-activated