Wes' Puzzling Blog

... trying to solve the puzzles of .NET

  • Tooltip now has the ability to be displayed as a Balloon

    While adding tooltips to the application I'm working on in C# Express (more on that later)  I noticed the property IsBalloon and though hmmmm. So I set it true and now my tooltips display as balloons instead of the normal rectangular popups. There are a few more changes to the ToolTip Members. Two others properties I think are helpful are ToolTipTitle and ToolTipIcon (ie Info, Warning, Error).
     
    Also on a side note when getting the links from the MSDN beta documentation for .Net 2.0, I noticed that the site is different. Does anyone know what is with the change to the MSDN beta documentation?

  • Copernic Desktop Search

    Copernic Desktop Search - They claim to be "The Search Engine for your PC".
     
    I just installed it and it is indexing my files right now, we'll see if it is as good as they say. The first thing I see that I don't like about it is their Web Search, it uses http://www.alltheweb.com with no option to change it, that I can find, however I will over look this since that is not its main purpose.

  • Using C# Generics on Static Classes

    I was playing around with some C# generics today and I began thinking about different things I could do with them. Then I began to wonder what happens if you give a static class generic type parameters? I wasn't even sure it would compile but sure enough it did. Then I tried to come up with an example where this might come in handy. Here is a simple factory pattern example using a C# generics:

  • Standard Windows Password Character

    I was writing a login form for an application I'm working on and I decided I didn't want to use the standard '*' as my password character. I wanted to use the black circle (●), the same one that windows login uses. I figured out what the Unicode value for it was (0x25CF) and then I tried to set that as the password character for my textbox through the designer but no luck it would only take standard ASCII characters. So I decided to set in my form constructor, like:

  • Windows Run Command Wish List

    In order to get more familiar with the new features in version 2.0 of .NET and C# I have been working on a side project using C# Express Beta 1. The project that I have been working on is a replacement for the windows run command. I for one use the run command a lot and there has always been some features lacking. Currently the run command provides a drop down list of the last 26 typed commands and the auto complete functionality for the file system / browser history as described here. Some features that I have already implemented for my new run command are:
    • Auto complete commands - as you type you are given a suggestion list matching what you have typed and the command that matches the closest is filled in for you
    • Smart suggestion list - the commands you use the most often appear at the top of the suggestion list, and the commands are pre-populated with common commands that someone might run like:
      • Start Menu Shortcuts
      • Control Panel Applets
      • Favorites
      • Recently Opened Documents
      • Common Windows Commands - i.e. My Computer, My Pictures, Administrative Tools, etc.
      • All Executables in the Path
    • Easily create short commands - being able to define short strings to run the command of your choice, like defining "ie" to open up Internet Explorer.
    • Command hotkeys - being able to assign a hotkey for any of your custom commands.
    • List computer shares on network - when you type "\\" it provides a list of the computers on your LAN and then when you type "\" again it provides a list of the shares on that computer (including hidden shares)
    Also one other side feature not necessarily related to the run command that I'm including is the ability to assign a global hotkey that will minimize the foreground application to the system tray.
     
    What I would like to know is if there are other things people would like to see included in a replacement run command? Please leave your suggestions in the comments. Once I have a working version I will post it.
     
    Update: For anyone interested I have released see this post for information about the release of my program Run++.

  • Turn AutoCompletion on for Run Command

    Have you ever been typing a file path in the run command and had to hit the down arrow to select the file you want from the drop down list? Wouldn't it be better if as you typed it automatically filled in the text for you?
     
    The run command uses the SHAutoComplete interface which is also how IE and most other auto completing text/combo boxes in windows do auto complete. By default the auto complete mode is set to suggest only, meaning just give a drop down of items that match what I have typed. There is also an auto complete mode to append, which automatically fills in the text with the closest match from the suggest list. The append mode is turned off by default but you can enable it by going to Internet Options > Advanced, and checking the box next to Use inline AutoComplete, or if you like you can change it in the registry Change the Auto Complete Mode [1]. Now when you type paths in the run command, open/save dialogs, IE address bar, and others that use the default auto complete registry settings you will have both the suggest and append mode.
     
    On a side note the textbox and combobox in .Net 2.0 also have auto complete functionality using the same SHAutoComplete underneath. The one thing I don't like about the new auto complete functionality in .Net 2.0 is that the dropdown width is set to the width of the textbox and you can't change it in code, at least I couldn't figure out how, this forced me to implement my own auto complete functionality.
     
    [1] http://www.regedit.com, if you are interested in the registry I highly recommend this site, it is one of my favorites.

  • My blogging philosophy and my need to analyse my referral log

    One of the primary reasons that I blog is to help the community, I don't really expect anyone to directly subscribe to by blog (just out of curiosity does anyone?). I depend on people finding my information through search engines. Most of my posts are technical things that for what ever reason I spent some time figuring out how to accomplish.