ASP.NET Hosting

Archives

Archives / 2005 / March
  • SharpToolbox is two-year-old

    Two years ago, I started collecting development tools for .NET on this weblog. This list quickly became a web site: SharpToolbox.com.
    Two years after, it references 680 tools including 186 libraries in 49 categories. To date, 33 tools have been flagged as discontinued.
    I believe SharpToolbox is a comprehensive directory of the available tools for .NET. Let's hope its sister site, JavaToolbox, will have the same future.
    I continue to add improvements to the sites. Soon I will improve the search and filter functions.

    Read more...

  • Windows Forms designer and DesignMode property issues

    It's interesting to know how the Windows Forms designer in Visual Studio loads forms. Did you ever wonder how it is possible for you to design an instance of a form while the underlying class is not completed and compiled? Raghavendra Prabhu explains how it works.

    One problem that remains unanswered is how to detect a form is in design mode, to avoid accessing to run-time resources. One would think the DesignMode property is the solution.
    Let's consider the following constructor for example:

    public MyClass()
    {
      if (!DesignMode)
      {
        _Connection = new DatabaseConnection("aceofbase");
        _Connection.Open();
      }
    }


    The small problem with the DesignMode property is that it is not always telling the full truth!
    The DesignMode property isn't set to true in the constructor.

    Remember, there's no real magic here.
    Visual Studio .NET creates your object as it parses the InitializeComponent() method. Once the object is constructed, Visual Studio .NET keeps track of the objects it creates, and simply says: newlyCreatedObject.DesignMode = true

    There is no definitive solution to this problem.
    All kinds of workarounds are used.
    • We could call GetService(typeof(IDesignerHost)) and see if it returns something.
    • Other option: test System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime
    • Some are comparing System.Diagnostics.Process.GetCurrentProcess().ProcessName to "devenv" to see if the form is hosted in Visual Studio. But I don't like this one because in many cases it won't work (like with VS add-ins).
    On a related note, Brian Pepin has written about the problems with designing abstract forms.

    Read more...

  • Targeted text ads are getting big!

    Google has just added new features to its AdSense program. Some are very cool like the ability to get money in your currency and directly on your bank account. Goodbye change rates and check deposit expenses!
    Another feature is Ad Links units, which display a list of topics that are relevant to a page. Each topic, when clicked, brings the user to a page of related advertisements.
    You can see how they look like and test them on this weblog. Look on the right. We'll see how they perform money-wise...

    Google also updated its Terms and Conditions to allow users to reveal how much they make out of AdSense. A lot of people already started to release some figures. And then we realize that contextualized text ads are becoming quite a big opportunity, and a full-time job for some.

    New players are starting to challenge Google and its AdSense and AdWords programs: Kanoodle, MSN, Overture/Yahoo!...
    Definitely something to follow and that will heat up in the near future.

    Read more...

  • New game: Tag The Tools

    I've just made an update to the SharpToolbox (and JavaToolbox): you can now tag the tools to help categorizing them.
    This works like del.icio.us. After tags have been added to tools, people can use these tags with the search function to find the tools.
    This should enable a looser classification, which could be better than the current category-based one.

    To tag a tool, go to its page and click on the "Add tags" link. That's all!
    Tags are words used to categorize tools and help people searching for them. Please only add tags that make sense for a specific tool.

    The next step will be to have a Google Suggest-like drop-down list to help using the tags...

    Read more...