Archives

Archives / 2009 / August
  • Use Ctrl-m in OneNote to create a new instance

    I love Microsoft OneNote and I use it so much that I want multiple OneNote instances open so that I can quickly use Alt-Tab to switch between the various notebooks, sections, and pages that I am referencing.  At first I did not think it was possible to create a second instance of OneNote but then I found that Ctrl-m will create that new instance for you.

    Looking under the Window menu, I see that it has been there the entire time: 

    image

    Interesting that I never tried looking in the Window menu but only found out about Ctrl-m from another user.  The OneNote 2007 Keyboard Shortcuts help topic also has Ctrl-m clearly listed.

    image

    I wonder if I looked in the File menu and just didn’t think to look under Window??  Or did I just not think that creating a New instance of OneNote is a Window menu function??  What did I not understand about “New Window”?  Or was I looking for the New Instance menu item??  I probably will never know… but I sure am happy that I found Ctrl-m.  :)

     

    Technorati Tags:
  • Use Alt-key to select arbitrary block of text in Visual Studio

    One of the my most favorite tips/tricks for Visual Studio is the ability to copy and paste an arbitrary block on text in the Source View by pressing and holding the Alt-key while dragging your mouse.  A quick example is the best way to describe it.

    Normally you can select text line by line, starting from a point in one line of text and going to a point in another line of text and including all of the lines in between.

    image

    But if you hold down the Alt-key and drag your mouse you can select an arbitrary block of text.

    image

    And now you can use the normal copy and paste functions to grab that block of text and paste it elsewhere like so:

    cation.EnableVis
    cation.SetCompat
    cation.Run(new F

    The example above is not very practical but I have found plenty of uses for Alt-Select during my daily development work.

  • Windows Server 2008 IIS7 SMTP properties

    In Windows Server 2003 IIS6 you were able to change SMTP properties from within Internet Information Services (IIS) Manager.  In Windows Server 2008 the IIS7 Manager does not handle SMTP anymore... but you can modify it by using the old IIS6 Manager which is provided as part of the Windows Server 2008 Administrative Tools.

    Under Administration Tools you will now find two different IIS Manager entries.  One for IIS7 and one for IIS6.  Choose the IIS6 Manager to change the SMTP properties.

    image

    The IIS6 Manager will only have an item for the SMTP Virtual Server.  Right-click on the SMTP Virtual Server and select properties.

    image

    This will display the familiar SMTP Properties dialog that you are used to from Windows Server 2003.  Now you will be able to change things such as the size limit of the messages, the number of messages per connection, outbound delivery delay notifications, etc.

    image

    image

  • Visual Studio paste without changing IDs in Source View

    When pasting a snippet of HTML into the Visual Studio source window, Visual Studio will automatically change the IDs to the default naming convention (TextBox1, etc.).

    image

    Most of the time though I do not want this to happen since I purposely want to have that ID copy exactly as is since it makes things easier for me when changing the name.  For example, it is easier to change FirstNameTextbox to LastNameTextbox than to change TextBox1 to LastNameTextbox.

    There is an option to turn the Auto ID elements on paste off.  It can be found in:

    Tools > Options > Text Editor > HTML> Miscellaneous > Auto ID elements on paste in Source view.  Uncheck the box to turn this feature off.

    image

    Now Visual Studio will leave my IDs alone:

    image

    Michael Campbell of SQL Server Audits pointed this out to me a couple weeks ago.

  • Friendlier Windows Update in Windows 7

    I recently upgraded my laptop to Windows 7 and got the new experience of the new Windows Update notification last night:

    image

    Very friendly, to the point, told me what was going to happen, and set my expectations correctly.  I liked it a lot.  Thank you Windows 7!

    Technorati Tags: ,
  • Unexpected error encountered opening Visual Studio project

    I recently tried to open a Visual Studio project that I had downloaded from Codeplex and received an error message:

    image

    Followed by this error message:

    image

    And then the Visual Studio project was not available in the solution.  All the project said was “The project file cannot be loaded.”  Not a very helpful error message.

    This is because the project was under Team Foundation Server (TFS) source control and I do not have the TFS edition of Visual Studio.  To resolve this issue open the project files in notepad and remove the source control provider lines.  Usually they look like this:

    <SccProjectName>XXXX</SccProjectName>
    <SccLocalPath>.</SccLocalPath>
    <SccAuxPath>XXXXXX</SccAuxPath>
    <SccProvider>{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}</SccProvider>

    Remove all 4 of these lines from the project file and then save it and reopen.  Now Visual Studio will not try to load TFS and you will not get the error message and the project will open correctly.

    -Jeff

     

    FULL ERROR MESSAGE TEXT:

    ---------------------------

    Microsoft Visual Studio

    ---------------------------

    Unexpected error encountered. It is recommended that you restart the application as soon as possible.

    Error: Unspecified error

    File: vsee\lib\vapifunctionwrapper\vapifunctionwrapper.cpp

    Line number: 169

    ---------------------------

    OK Cancel

    ---------------------------

     

     

    ---------------------------

    Microsoft Visual Studio

    ---------------------------

    One or more projects in the solution could not be loaded for the following reason(s):

    The application for the project is not installed.

    These projects will be labeled as unavailable in Solution Explorer. Expand the project node to show the reason the project could not be loaded.

    ---------------------------

    OK Help

    ---------------------------