Hide your mouse cursor in Windows for ALL applications (even Visual Studio)


Although Windows already has an option to hide the mouse cursor whilst typing, which can be found under Control Panel/Mouse, this is respected on a ‘per application’ basis.

Unfortunately, many applications, such as Visual Studio, do not respect this setting, and leave the mouse cursor visible whilst typing.

This can be quite annoying, as one tends to type exactly where one clicked, i.e., where the mouse cursor currently is, and especially in the case of developers, the IDE is particularly rich, meaning that the mouse cursor will normally also activate tooltips related to the item they are hovering over.

This is a small script I have written and compiled using AutoHotKey that hides the windows cursor when a user starts typing any alphanumeric (and certain coding-related) characters, and shows it again as soon as a mouse movement is detected.

You can either get the latest executable from here, or you can run it as an AutoHotKey script by downloading the AutoHotKey utility from here

You can find the project landing page here, and my github repository here.

Advertisements

Visual Studio 2012/2013 Page Inspector fails with “Object reference not set to an instance of an object”


I’ve had this problem for as long as I can recall.  My page inspector in Visual Studio 2012 never worked… which normally would have been ok, since I could always do the old-school edit+save+refresh routine… but when you know that the feature exists, it is a bugger that it doesn’t work.

I tried everything, from disabling all my extensions and add-ons, to hooking up a debugger to my devenv process… to the obvious google-and-bing-fu manic searches… but got nothing.

If you check your ActivityLog.xml, you will see that Page Inspector is blowing up with a NullReferenceException… no surprise there.

After installing VS2013 I hoped that all of this would go away, but I got the same error.

Page Inspector fails with Object reference not found
Page Inspector fails with Object reference not found

Finally, I had the great brain wave of setting Internet Explorer as my default browser and restarting Visual Studio (I’m a chrome user).

…and voilà… page inspector finally works :(

One would think that by this time, this whole thing about being wired-in to Internet Explorer was a thing of the past… clearly it is not.

I’ve filed a bug report accordingly on Microsoft Connect.

DM2S63MFEY9G

Show more tiles on your Windows 8 and 8.1 start screen


Ok, so I’m slowly getting used to the Windows 8+ tiles mode for the start screen, and I’m admittedly preferring it to the old start menu, or the full blow ‘all apps’ view that’s available as of Windows 8.1.

But wouldn’t it be nice if we could make the tiles smaller?

This is actually an option, but quite a hidden option.

This is my tiles view before:

Windows tiles default view
Windows tiles default view

And here is what they look like after:

Smaller windows tiles
Smaller windows tiles

How do I do it? ..you may ask

Simple, just:

  • Open your charms (put your mouse in one of the left corners, or slide your finger from the right edge of the screen, inward).
  • Select Settings
  • Select Tiles
  • Select Show More Tiles
Show more tiles
Show more tiles

Note: This only applies if you select ‘settings’ whilst in ‘Tiles View’ (i.e. not in desktop mode)

I hope this helps someone :)

Increase Virtual Machine Disk (vmdk) Performance On VMware


Here are some tips I found for speeding up the performance of a virtual disk, in my case I am using vmdk files on VMware Workstation

Follow the link -> http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008885

Send web page to device using Google Chrome


(Note: This post applies to Google Chrome.  Similar alternatives exist for FireFox)

I’ve often been browsing the web and came across a site that needed to be loaded on one of my devices (such as to download an app).

Copying the URL can be cumbersome, so I needed a solution for this annoying task.

Solution 1

The first solution I had come across, and have been using, is a QR Code Generator for Google Chrome… which can be found here -> http://tinyurl.com/ou7nq5d

The way this works, is that on any page you would generate a QR code for the current page, and then just use a QR Code scanner to scan the URL to your phone.

Step 1: Right-Click, and select ‘Generate QR Code’

Generate a QR Code
Generate a QR Code

Step 2: Scan the generated QR Code with your phone… and voilà :)

Scan the generated QR Code
Scan the generated QR Code

This solution is a bit cumbersome, but less cumbersome than actually copying the URL to your phone (or emailing/texting/gtalking it to your phone).

Solution 2

The second solution I found is even better!  This works similarly to the ‘other devices’ option in chrome, but with far less clicks.

Install the chrome to mobile plugin -> http://tinyurl.com/crkw3vx

Once this is done, a nice little icon will appear in your address bar.

Chrome to Mobile
Chrome to Mobile

This will show a pop-up with all your devices that are connected to your google account.

Send to device
Send to device

Once you do this, a push-notification (for iOS only, Android just goes straight to the page) is sent to your device (the device must have chrome installed)… select this, and bingo… you’re now browsing the page on your device.

iPhone Notification
iPhone Notification
iPad Notification
iPad Notification

Note: This will not work for Windows Phone (since there is no Chrome browser at the time of writing)… but the QR Code solution will work ;)

“Windows Program Compatibility mode is on. Turn it off and then try Setup again.” – How to uninstall an app if this happens.


I tried uninstalling an application (in my case, I was uninstalling Visual Studio 2012 RC), and I kept getting this error.

Following the logs and the help file got me nowhere, and neither did searching all over the internet for instructions on how to uninstall this using a tool or the registry or whatever.

Disabling the program compatibility service also does not work.

It turns out that setup.exe was marked to run in Compatibility Mode, which is what was stopping me from uninstalling.

So my mission was now to find where the uninstall package actually is on my hard drive and to check what the compatibility settings are.

This is simple: (instructions are for uninstalling on Windows 8)

  1. Run the uninstaller until it fails
  2. Go to task manager
  3. Call up the context menu for the installer process (right-click)
  4. Select ‘open file location’
  5. This will open the package folder
  6. Call up the context menu for the uninstaller executable
  7. Select the ‘compatibility’ tab
  8. Disable all compatibility settings over here
  9. ~the end~

I hope this helps someone!

 

Setting CSharp (C# / CSC.exe) Compiler Defaults


A little known secret about the .NET C# Compiler (CSC.exe) is that it allows us to set ‘global defaults’.

To do this, create a text file called CSC.rsp in one of two places:

  • The current directory (handy for project specific settings)
  • The directory where CSC.exe is stored
    (generally found in C:\Windows\Microsoft.NET\Framework\{version}\csc.exe)

Note that local settings (current directory) will override the global settings.  Also note that there already exists a global CSC.rsp file with the common ‘includes’, you can either add to this, or simply add a setting to this global file that also includes a secondary settings file (more below).

Any command-line switches that you would normally pass to csc.exe can be added in this text file.

If you do not want these settings to be global, but you want to still supply settings in a text file (handy for multi-project settings which you only want to update in one place), just add them to a different named text file and add a command-line argument to csc.exe like so:

csc.exe @{path\to\settings\file.txt} …

If on the other hand you want to explicitly ignore any local or global settings file, simply run csc.exe using the /noconfig argument.