in

ASP.NET Weblogs

The DreamLand Express - Charles Oppermann's Software Blog

Commentary on software design, development and management
  • Balloon Timeout and Notification Duration

    Today I was reading a new post on one of my favorite blogs, The Old New Thing by longtime Microsoft developer Raymond Chen. I got to know Raymond in the waning days of 1994 when we were working on "Chicago", the codename for what would become Windows 95. I was a rookie Program Manager for this new thing called "accessibility" and he was the go-to developer for just about anything in the guts of Windows.

    In his blog post today, Raymond discusses balloon notifications in Windows, specifically why applications no longer have control over how long a notification may appear visible. In Windows 2000, an application could call the Shell_NotifyIcon function to display a popup balloon near the taskbar notification area. If you specified a timeout value via the NOTIFYICONDATA.uTimeout member, the value would be used to determine how long to display the notification.

    However, starting with Windows Vista, the shell ignores the uTimeout member and instead uses the global message duration value that is set and retrieved using the SystemParametersInfo function, specifically the SPI_GET/SETMESSAGEDURATION value.

    The reason for ignoring the application-supplied timeout is so that users can gain more control over their working environment. People with various sensory, cognitive and mobility disorders often request more global configuration settings to help them deal with the tremendous amount of information presented in a graphical user interface. Some examples:

    • A person with low vision needs more time to read something. Having the message fade out after a few seconds is frustrating. This is true of people with certain reading disorders.
    • Some cognitive disabilities affect the way people react to information display peripherally. It might take longer for some people who are focused on one area of the screen to react to something displayed in the bottom right corner.
    • A person using a mouth-stick or other external aid to move the mouse pointer may need more time to move the pointer to the message so that it can be clicked and acted on.

    FYI – you don't have to be disabled to have need for these options. There are many situations where otherwise so-called able-bodied people have their vision, perception and mobility affected. I have good vision, but with multiple monitors, I've missed notifications appearing on one display while my attention was focused on another display.

    A "timeout" setting was something the accessibility team was pushing for in Windows 95 to give the OS and applications an indication that the user required more time to process things that would otherwise time out. There weren't balloon notifications back then, so it wasn't as urgent. With Windows XP and the explosion of non-modal timed notifications, it became imperative and thus the SPI_SETMESSAGEDURATION setting was incorporated into Windows Vista and exposed in the Ease of Access Center.

    The user interface to control the message duration value is contained within a section of the Ease of Access Center:

    1. Click the Start button or press CTRL+ESC
    2. Type "ease" and choose the Ease of Access Center
    3. Choose "Make it easier to focus on tasks"
    4. The option "How long should Windows notification dialog boxes stay open" is towards the bottom of the list

    The default value is 5 seconds, and can be set to 7, 15, 30, 60, and 300 seconds (5 minutes).

    Some of the commenters on Raymond's posting were concerned that ignorant and/or poorly behaved applications that wish to have their notifications displayed for as long possible would abuse the SPI_SETMESSAGEDURATION value and thus adversely affect all applications.

    The reason there is a public API is simply that the Ease of Access Center needs to do it. In addition, Microsoft wishes to enable other accessibility aid vendors the ability to create their own tools to meet the unique needs of their customers. Windows cannot currently segregate vendors and say, "only accessibility aids may touch this setting." If the API is public, then it can be used – and abused – by any application running with the user's permissions.

    If a specific application wishes to have a message display for customizable period, then that's up to the application to handle the message display. I hope that this application would query SPI_GETMESSAGEDURATION, become informed of the user's request, and act appropriately.

  • Mailbag – Flash Player Install and Windows Games – Reversi and Minesweeper

    Nearly every day people come up to me, or email, questions on software. Last night at the Tampa Bay Computer Society, a gentleman was having trouble getting Adobe Flash installed. I went through the installation process and it appeared to work correctly, but going to YouTube, the following message was displayed: "You need to upgrade your Adobe Flash Player to watch this video."

    Since I knew the installer had completed without error, I figured that his security tools were causing trouble. We disabled ZoneAlarm and tried again. Same message. Then I checked if any Internet Explorer's Add-ons were interfering. I noticed that "Shockwave Flash Object" was disabled. Presumably, the user had disabled this add-on, and regardless of reinstalling it, it stayed disabled.

    The real problem here was that most websites assume that if a particular object didn't load, it's because it wasn't downloaded by the user. With it becoming increasingly easy to disable add-ons, websites should provide more guidance.

    Today I got a question in email from one of the TBCS members:

    Hi Chuck. . . I love to waste time playing 'minesweeper'. Right now my percent of won games is 8%. Well, I think I've gotten a lot better (HA)! So I'd like to 'reset' this counter. Can you tell me what file I can delete to reset this counter? I know this is a nothing kind of request, but that 8% really is annoying!

    Ah Minesweeper. Originally released in 1990 in the Windows Entertainment Pack for Windows 3.0, it was included in Windows 3.1 in 1992. My favorite Windows game was always Reversi, and I was upset that it was dropped in favor of Minesweeper in Windows 3.1. When I started working at Microsoft in 1994, I quickly found the source code to Reversi and kept it around. Windows XP and MSN Games introduced a multiplayer version of Reversi.

    Back to Minesweeper and resetting the statistics. I knew that with Windows Vista, all the games got a common interface, and I knew that you could reset the statistics in Solitaire, so I did quick search and was surprised at the tremendous amount of serious interest in Minesweeper. There are entire websites (here, here, and a wiki) devoted to playing Minesweeper effectively.

    I was able to point the user to the "Reset Statistics" button in the game, and she was grateful for the guidance. The lesson I learned in all this was that no matter the subject matter, the internet allows for people who love something (in this case a game), to meet and exchange information.

    Posted Apr 12 2011, 11:14 AM by ChuckOp with 2 comment(s)
    Filed under:
  • My Favorite Keyboards: The IBM Model M and the Microsoft Natural Keyboard

    [Update 2011-04-04: Added links to Coding Horror articles]

    As a long time computer user, software developer and observer of the personal computer revolution, I've been exposed to many different pieces of hardware. At my new job, I brought in my trusted Microsoft Natural Keyboard and one of the executives made note of it as it was his favorite keyboard as well.

    The Early Years

    The early years of the personal computer revolution were notable for many whacky keyboards that were available. Each new computer design had their own way of doing things – layouts were not standardized, and each manufacturer had different ideas about the size and feel of the keys. Notable were the Commodore Pet, the TRS-80 Color Computer Chiclet keyboard (which I used for many years), and the original Apple Macintosh M0110 keyboard, which didn't include arrow keys.

    Even IBM, with its long history of typewriters, word processors and computer terminals was not above ignoring its collective history regarding keyboards. The original IBM PC keyboard departed from IBM's experience with its lousy vertical ENTER key and oddly sized SHIFT keys. The IBM PCjr keyboard used an Infrared Chiclet keyboard.

    The IBM Model M

    But IBM redeemed itself with the famous IBM Model M keyboard. Originally shipped with the IBM PC-AT in 1984, this keyboard was very popular with computer users throughout the late 1980's and 1990's. It was very solid, had a long coiled cord, and a distinctive sound – though loud by today's standards.

    I didn't own a Model M keyboard until 2000, but I did have for a few years one of its variants, the space-saving model that shipped with the IBM PS/2 Model 25. This was the first PC I owned, purchased in early 1988. This keyboard didn't include a number-pad and saved space by being narrower. By 1991, I had sold that computer and keyboard. However, in 2000, I bought a used IBM PS/2 Model 25 off eBay, and to my pleasant surprise it came with a full-sized Model M keyboard.

    The Microsoft Natural Keyboards

    However, in the 1990's, I fell in love with another keyboard – the Microsoft Natural Keyboard. When I started working at Microsoft in 1994, everyone was given these keyboards with their computers. They also sold in the company store for a greatly reduced price. I purchased a couple of these keyboards to use at home.

    It was one of the first keyboards to support the new Windows and context menu keys. It was comfortable, solidly built, and worked very well.

    I had learned touch typing in high school (very glad I took that class) and it had always served me well. But the Natural Keyboard exposed a flaw in my touch typing. I had a habit of using my left index finger to press the Y key, but that didn't work well with the Microsoft keyboard.

    As a "natural" keyboard, it is split down the middle; with the T/G/B keys on the left separated by an inch or so from the Y/H/N keys on the right.

    So, the Y key was too far away or my left index to reach. I quickly got used to this, and began to appreciate a curved keyboard versus a straight keyboard, which tends to force your wrists to bend at an angle, which can cause repetitive strain injuries.

    Microsoft Keyboard Missteps

    To counter the perception that the keyboard was too large, Microsoft came out with a smaller version, the Natural Keyboard Elite in 1998. To save space, the design modified the size and layout of the cursor keys along with the positions of the Insert/Delete, Home/End and Page Up/Page Down keys. Traditionally with 101-key keyboards, there were two rows of three keys; Insert, Home, and Page Up on the first row, with Delete, End, and Page Down on the second row.

    The Natural Keyboard Elite instead used three rows, with the Home and Page Up keys on top, End and Page Down in the middle and Delete and Insert on the bottom row. Instead of the inverted-T arrangement of the cursor keys, a diamond shape layout was used. The cursor pad keys were also smaller. I remember not liking the Elite version of the keyboard and avoiding it.

    Thou Shalt Not…
    Keyboarding

    The Natural Keyboard Pro

    Then Microsoft did something wonderful and in 1999 came out with the Natural Keyboard Pro model. This keyboard restored the original placement of the cursor pad keys, with the original size, and added a number of buttons along the top to invoke features within Windows. In addition, the Natural Keyboard Pro supported PS/2 and USB connections, even including two USB ports in the back.

    I still have an OEM version of the Microsoft Natural Keyboard Pro sold by Dell. It has beige application buttons and doesn't have a PS/2 connector, only USB. The Calculator button is renamed to Dell.com.

    I have a collection of these keyboards now – all but one in working condition. The plastic has yellowed slightly due to ultra-violet (UV) exposure, but not as bad as some other hardware I have. I'm typing this blog post on one that is nearly 15 years old, but after a recent cleaning, looks great and works perfectly.

    Cleaning Your Keyboard

    Cleaning the Microsoft Natural Keyboards is easy. While some people claim you can throw a keyboard into a dish washer to remedy a liquid spill, I personally don't recommend this.

    I've spilled water, tea, and more than one Coke-cola into my various keyboards.

    If you ever spill something on your keyboard, the first thing you should do is flip it over to prevent the liquid from seeping in via gravity. Disconnect it and blot up as much excess liquid as you can. Get a bowl and fill it with warm soapy water. Remove the key caps and place them in the soapy water to soak. Continue to blot up excess liquid.

    I prefer to disassemble the keyboard to clean it, removing as many pieces as possible and cleaning each one with an alcohol-based cleaning solution. After the keys have soaked for a while, pour out the soapy water and thoroughly rinse the key caps and drain out the excess water. Lay out the keys on a towel and let them dry before putting them back on.

    It's amazing how much junk gets into keyboards – eyelashes, dead skin, ear wax, you name it. Use a Q-tip swab soaked in alcohol to clean the channels between the rows. Compressed air is also helpful to blow out some of the debris.

    What are your keyboard experiences? Any horror stories or particularly memorable keyboards you've used? Do share!

  • HTML Email Oddities with Outlook 2010 Part I: Automatically Detect Language

    Two days in a row I’ve had to hunt down strange issues with HTML formatted emails created with Microsoft Outlook 2010 beta.

    The first involved a reply to a mailing list.  For some strange reason, my reply was encoded using the ISO-2022-JP character set.  The message I was replying to was encoded as US-ASCII, but for some reason, Outlook and/or Word changed the Normal style to be Japanese instead of English.  I have no idea how that happened for that particular message.

    I discovered the problem after a user wrote to me and said that my several of messages contained garbage characters at characters outside the ASCII range.  Curly quotes, etc.

    Word was correctly decoding the ISO-2022-JP character set, and anyone who had a email program that understood the character set didn’t notice any problems.  However older email programs had issues and even the user said later that my messages prompted her to download the Japanese language font pack for Internet Explorer and Outlook Express on Windows XP.

    I narrowed it down to a particular mailing list thread.  After replying to a message, all my messages and some from other users on the same thread had the Japanese encoding.

    Going back to the original message, I used the Style Inspector and Reveal Formatting features of Microsoft Word to figure out that it was the Normal style that was adding the Japanese encoding.  However, changing the language for the Normal style did not remove “(Asian) Japanese” from the style specification.  It just added “(other) English (U.S.)”. 

    I verified that Normal.dot and NormalEmail.dot are correct.  It’s just this particular message.

    I suspect that Word’s “Detect language automatically” option kicked in somehow and changed the proofing language to Japanese. 

    If you have had a similar issue, let me know.

    Resources:

    Microsoft Word Product Team Blog - Posts tagged with 'Style'

    Style Basics In Word

    Outlook or Word 2010 Style Language Problem

    Digg This
  • Fixing Windows 7 Help and Support

    For the past few months I noticed that Windows 7 Help and Support feature wasn’t working correctly.  Pressing WIN+F1 or choosing “Help and Support” from the Start menu would open a window, but the help contents weren’t there.  Searching for a topic wouldn’t work either.

    The text would display “__elbasuser__” in several places.  I narrowed the problem down to using the offline help option.  Choosing online help would display the correct help content, but the problem still nagged me.

    After much searching on the internet, I found a solution.  Apparently when the Broadcom Bluetooth software is installed, it corrupts Windows Help.

    The solution is to delete a registry key.  Under the following key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Assistance\Client\1.0\Namespaces\OEM\en-US\Titles

    Remove the following subkey:

    "BRCM_Bluetooth_Help"

    Restart Help and Support and you should be set.

    Digg This
  • Apple Mouse Marks Mighty Change

    Various pundits want to proclaim Apple's new multi-button mouse as a major departure and admission that clean design (in the form of a one-button can't be screwed up manner) isn't always acceptable to the consumer.

    Recall that the original Macintosh keyboard did not have cursor keys.  The original vision was to have the mouse perform all functions, while the keyboard was solely for text input.  Steve Jobs and Macintosh team wanted to force people into using the mouse for all operations, even scrolling pages of text.

    After several months, Apple realized their folly and made a keyboard with a number pad and cursor keys.  I don't know if that was introduced along with the "Fat Mac" in October 1984 or was slipstreamed into the Macintosh production line.  I know that it hard to get one of those original keyboards.  I am looking for one by the way!

    Review: Apple Mouse Marks Mighty Change - Yahoo! News

  • MSN Desktop Search

    I've been using the latest MSN Desktop Search with the MSN Toolbar.  The latest version adds tabbed browsing to Internet Explorer, but I turned it off.  Similar to when I spent several weeks with Firefox, I just didn't feel comfortable with the tabs.  I'm just too used to ALT+TAB and ALT+F4 to navigate.  I know CTRL+TAB and CTRL+F4 will do the same, but why bother?

    Anyway, the Desktop Search is excellent and I've loaded up many more IFilters to expand it's capabilities.

    I'm wondering if a IFilter exists for browser history and the registry - although I don't know if search UI would be able to take advantage of them.  More details to come.

    Posted Jun 29 2005, 10:51 PM by ChuckOp with 1 comment(s)
    Filed under:
  • Good mailing list for Active Directory Programming

    Carlos Magalhaes has been quietly running a fine mailing list for developers working with Active Directory and related technologies.  ADSI or the .NET System.DirectoryServices libraries are covered and there is excellent response time and good discussion.

    Join here:
    http://groups.yahoo.com/group/ADSIANDDirectoryServices/

  • Microsoft Windows Internals Review

    I’ve always been a bit twiddler – whether it’s doing machine code on an 8-bit RCA COSMAC microprocessor or writing 16-bit drivers for Windows 3.1 or doing Windows Server 2003 storage related development, I’ve never shied away from getting into the meat of the system.

    In 1992, I got “Inside Windows NT” by Helen Custer to discover how Windows NT was structured.  I purchased at least one of the other editions as well, authored by David Solomon and Mark Russinovich.  The fourth edition has a new name, “Windows Internals, fourth edition”

    Solomon and Russinovich are well known for their knowledge of how Windows works deep under the covers.  Russinovich produces a number of very cool tools, many of them free at his Sysinternals web site.

    http://www.sysinternals.com/

    This book does not cover the Win32 API or the .NET Framework.  It does cover the kernel, memory management, I/O sub-system including ACPI and Plug and Play, and storage.  The fourth edition covers low-level changes in Windows XP and Windows Server 2003.

    This is not a book with coding examples.  However, its best feature is the great number of sidebars with various “experiments” you can do, often featuring unique ways of using the Sysinternals tools.  While I normally I do not care about memory management, it was fascinating to read how sophisticated the Windows kernel is.

    While obviously system level developers will gain the most benefit from this book, there is a ton of information for IT professionals as well – particularly for system performance tuning.  I was able to use the information regarding Event Tracing for Windows (ETW) in my current project.  Sadly, the final chapter, on Crash Dump analysis, seems incomplete and ends rather abruptly.  Being a Microsoft Press author myself, I wonder if schedule pressures were involved.

    The book published by Microsoft Press (ISBN 0735619174) and is available from Amazon.com at:
    http://www.amazon.com/exec/obidos/tg/detail/-/0735619174/

     

  • Twisted Podcasting?

    Arik Korman, director for my buddy Bob's radio show has started a Podcasting blog.  Arik is a fascinating person, and he infuses his podcast with the same production skills that has helped make the Bob Rivers Show top-rated in the Seattle market.

    The first 'cast is nearly 17 minutes long, and I haven't finished listening to it yet, but it's got my interest.  Check it out at:

More Posts Next page »