All posts by ArchMunky

Disabling the new typing animation in Office

One of the new “features” of Office 2013 is a new animation that occurs as you type.  If you are typing quickly, the cursor seems to lag behind; that’s quite disconcerting.

The good news is that you can disable it; the bad news is that you have to edit the registry to do so.  Add the following new key to disable the animation:

HKCUSoftwareMicrosoftOffice15.0CommonGraphics
Add new DWORD: "DisableAnimations" = 1

Then you have to reboot (this is Windows, after all).  This new setting disables all animations, but honestly I don’t see much difference.

If you want to want to reverse this change, simply modify the new key and set it to zero.

Installshield Limited in Visual Studio 2012 Professional

Microsoft decided to drop the ability to create simple setup installers in 2012 but they worked with Flexera to allow us to use Installshield Limited to create our installers.

Below are the step required to create a simple installer.  It should give you an idea how to create an installer for your VS 2012 program.

Notes:

  1. First, you need to make sure that all DevExpress libraries (and other custom references) in your program are set to CopyLocal — this will have the build system copy the libraries to binDebug (or binRelease) so you can include them in the InstallShield project.  Also be sure to build your app before creating the installer.
  2. Second, I’ve been creating entirely new solutions for each installer in a separate directory.  This eliminates the problems 2012 has with opening the old installer types (and may prevent future problems with bundling).  It also makes the build process much faster on the program you are creating.

Creating a new installer:

  1. Create a new InstallShield Limited Edition project for the installer (in ProjectsVB.NetInstallers)
  2. Application Information
    1. Set the default installation location if you don’t want the program to be installed in Program Files
      1. In the Application Information sidebar, click Edit the default installation location
      2. Right-click Destination Computer (or press INS key) and choose New Directory; name it C:
      3. Right-click the new C: directory (or press INS key) and choose New Directory; name it YourSubFolder (obviously change it and repeat as necessary to create your desired directory structure)
      4. Right-click new YourSubFolder directory (or press INS key) and choose New Directory; use the name of your project
    2. Specify company name: YourCompanyName
    3. Specify application name: YourAppName
    4. Specify application version: YourAppVersion
    5. Specify company website: YourWebsite
    6. Change the icon to your project’s icon (if desired)
  3. Installation Requirements
    1. App does not require specific operating system
    2. App requires .Net 4.0 Client Profile (but I do not include it in the installer — see Problems below).
  4. Application Files
    1. Click on the C:YourSubFolderYourAppName folder.
    2. Press Add Files button and go to your App’s bin/Debug (or bin/Release) folder and add all exe/dll/config files.
  5. Application Shortcuts
    1. Modify the name of the Start Menu shortcut  (if desired)
  6. Application Registry
    1. Add registry keys if your App requires them.  Use the INS key to add new keys and values (or right-click)
  7. Installation Interview
    1. Do not display License Agreement
    2. Do not prompt for Company/User name
    3. Allow modification of installation location
    4. Do not launch application when the install completes
  8. Organize Your Setup, General Information
    1. Set Use Software Identification Tag to No.
  9. Prepare for Release, Release
    1. Click on “Express” and set Setup File Name to YourAppName Setup
  1. Right-click on the Solution and choose Properties
    1. In Configuration Properties/Configuration, set your project to SingleImage.
  2. Build the project
  3. Verify the project installer name
    1. In Prepare for Release, Release, Builds/Express/SingleImage/Disk Image(s)/DISK1: check file name

Problems:

  1. I have not yet been able to include the .Net packages in the installer.  The downloads from within the Installshield project always fails.  Update: you have to run Visual Studio as Administrator (right-click, “Run as Administrator”) in order for the installer packages to download.  This should be a one-time thing; just run as admin once to download all of the redist files you need and then open your project normally (without admin) to work on your project.
  2. I had to disable Use Software Identification Tag or it would give me an error upon building.  The installer creates correctly without it and will install the project with no problems.  When I get some more time I’ll look into this further.

Windows: Add to the Send To menu

To quickly add new destinations to the Send To menu, simply type shell:sendto in the Location Bar in Windows Explorer.  It will show you the existing destinations, and you can add new destinations by simply dragging new destinations into this window.Wonder what else is available via this shell feature?  Check this website.

Access: Listbox and form synchronization

In Access databases, I find it nice to have a listbox on each form that allows the user to quickly jump to a given record in the form’s dataset. Access2007 makes that very easy; when you drop a listbox on the form, the wizard has an option to automatically perform this operation.

However, when the user moves to another record using the navigation buttons (or simply pressing tab through all of the form’s fields), the listbox is not updated. Having this navigation listbox synchronized has been something of a holy grail for me the past 18 months, but I could never get it to work correctly. Until today…

This example assumes that the listbox is bound to the dataset’s key field, which is also displayed in textbox on the form (called ItemID in this example).

On the forms OnCurrent event, create an Event Procedure and call this new procedure:


 Private Sub Synch_Listbox()
If Me.lstItems = CStr(Me.ItemID) Then
For i = 0 To lstItems.ListCount - 1
If Me.lstItems.Column(0, i) = "ItemID" Then
Dim FormID As Integer
Dim ListID As Integer
FormID = Me.ItemID.Value
ListID = Me.lstItems.Column(0, i)
If ListID = FormID Then
Me.lstItems.Selected(i) = True
End If
End If
Next
End If

End Sub

The first if statement If Me.lstItems CStr(Me.ItemID) is important; we don’t want to call this synchronization routine if the list box and form data is already synched. I have to convert the integer ItemID to string to match the strings returned by the listbox. Also, in the loop, we need to make sure we don’t try to match the column header; that’s the purpose of the if statement If Me.lstItems.Column(0, i) “ItemID”.

That’s all there is to it; it’s amazing how simple it turned out to be. 🙂

Disable PC Speaker beeps

I normally do not have Windows Sounds enabled; after a while, they become a little annoying. But a greater annoyance is the PC Speaker; when sounds are turned off, you’ll often hear beeps coming from your PC. Here is how you can disable them in XP/Vista/2003/2008 using the Command Prompt (Run->cmd):

Temporary: net stop beep
Permanent: sc config beep start= disabled

Note the space between start= and disabled.

Mapping volumes to logical drive names

I had a problem on my work computer where System Restore kept complaining about a lack of available disk space, no drive on my machine had less than 70GB free. System Event Log entries gave me a volume number but no way of knowing which logical drive letter it was referring to.

The best way to map these numbers is to search through the registry using RegEdit for the text inside the Volume{long string here} brackets. It will take you to the key HKLMSYSTEMMountedDevices, where you can match the “long string here” text to the mounted drive.

It turns out that it was my C: drive, which had a whopping 74GB free. The problem is that my drives are rather large, and it looks like Windows only checks the C drive to see if you have enough free space. I disabled SR on my data drives; we’ll see if that fixes the problem.