The blog has moved to a new address. The blog is now located at


Wednesday, December 13, 2006

Html Agility Pack

This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT (you actually don't HAVE to understand XPATH nor XSLT to use it, don't worry...). It is a .NET code library that allows you to parse "out of the web" HTML files. The parser is very tolerant with "real world" malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams).
Sample applications:

  • Page fixing or generation. You can fix a page the way you want, modify the DOM, add nodes, copy nodes, well... you name it.
  • Web scanners. You can easily get to img/src or a/hrefs with a bunch XPATH queries.
  • Web scrapers. You can easily scrap any existing web page into an RSS feed for example, with just an XSLT file serving as the binding. An example of this is provided.


Download Html Agility Pack

[Via Roy Osherove's Blog]

Tuesday, December 12, 2006

How to capture the form and save it to a bitmap

The following example source code shows how to capture the form and save it to a bitmap. Hope you find it useful.

Point point = new Point();
Rectangle rectangle
= new Rectangle(point, this.Size);
Bitmap bitmap
new Bitmap(rectangle.Width, rectangle.Height, PixelFormat.Format32bppRgb);
// render the form to the bitmap
this.DrawToBitmap(bitmap, rectangle);

ReSharper 2.5

ReSharper 2.5 is an add-in to Visual Studio 2005. Besides further improvement of ReSharper 2.0 stability and performance in all areas, the new version provides a number of new features:


  • Navigate from here - You can view the possible navigation destinations from the place where the caret currently rests
  • Enabling and disabling context actions
  • New context actions and quick fixes
  • Value analysis - Use these options to define the means of code inspections: lists of assertion and terminating methods, and code annotations.
  • Code preview in the Find Results window - Results of usages search display in the Find Results window that enables you to perform a number of actions.

Monday, December 04, 2006

HnD - Customer Support Server

HnD is a Customer Support system, integrating helpdesk features and a forum system, and was built as an example of what you can do with LLBLGen Pro.


It's been released as open source software (using the GPL v2 license) and you can download and use it for free.


To successfully install HnD, you need to have the following installed / available to you on the webserver:
  • .NET 2.0
  • IIS 5 or higher with ASP.NET 2.0 installed
  • Access to an SMTP server

HnD stores its data in a database, and you can use Microsoft SqlServer 7 / 2000/ 2005 / Express or MSDE.


  • Unlimited forums can be organised into as many sections as you like.
  • Both public and private forums using role-based security
  • Queueing facility for support teams, enabling claiming questions and moving threads between queues. Threads can be auto-queued through forum settings.
  • Role-based security system for easy right management
  • Flexible attachment system for messages which is configurable per forum and user role.
  • Attachment approval system for moderators.
  • Editing all messages, editing thread properties and closing and moving threads for moderators.
  • Powerful search facility utilizing SqlServer's full-text search.
  • Native ASP.NET 2.0 code written in C#
  • Using LLBLGen Pro v2.0 for all data-access functionality.
  • Standard UBB message formatting with various font styles and sizes as well as allowing quoting, code display, attachments and automatic URL linking.
  • Email notification of replies to your topics.
  • Allows fine grained control over access to viewing, posting, replying, marking threads as 'done', thread memos and many other options.
  • Personal profile creation and management.
  • Administration centre with forum and section setup, complete group and member management, extensive ban management, support queue management, role management, mass emailing of groups and users by the administrator and many other options.
  • Complete control of fonts and colors by ASP.NET 2.0 theme support.
  • Open source, so changes and additions can be easily implemented.
  • And many more...


[Via Roy Osherove's Blog]

Paint.NET v3.0 Beta 1 is now available!

Change log:

  • New effect: Clouds
  • New menu command: Edit->Fill Selection (shortcut key: Backspace). This will fill any selected area with the primary color.
  • New toolbar item / hotkey: The brush size may be manipulated with +/- buttons in the toolbar. Hotkeys for this are [ and ], and you may hold Ctrl to increment or decrement by 5.
  • New translations: They are not complete yet, and in fact some have just been started. They are mostly in place right now in order to get the code correct: Chinese (Simplified), French, German, Japanese, Korean, Portugese, and Spanish. You will have the ability to choose one of these languages during installation, and from the Help->Language menu, but the text will still be either mostly or completely English. Complete translations will be finished by February.
  • Added left-handed shortcut keys for Cut (Shift+Del), Copy (Ctrl+Ins), Paste (Shift+Ins)
  • Upper-left coordinate of selection is now displayed in the status bar
  • When moving text with the Text tool, the anchor point coordinate is now displayed in the status bar
  • Fixed: In high-DPI mode (120dpi), the color swatch would translate the mouse location to the wrong color palette entry
  • Fixed: Alpha-channel handling for bicubic and super-sampling image resampling methods
  • Fixed: Very slow download speeds for updates in Vista
  • Fixed: In Vista, the updater would relaunch Paint.NET with the same administrator privileges that the installer executed in. Now it will relaunch Paint.NET with the pre-elevation user and privilege level. Note that this fix will not be apparent until the next update to Paint.NET.
  • Fixed some layout and rendering issues with the floating tool windows in Vista
  • Fixed a rendering issue with the font selection dropdown list
  • Fixed a performance issue with the font selection dropdown list in Vista
  • Right-clicking on a color in the palette will now set the secondary color
  • Palette files now allow comments to be placed after color values
  • Fixed: If Edit->Paste in to New Image was pasting a bitmap with transparency (from Paint.NET), it would have a white background instead of a transparent background.
  • Fixed: Right-clicking on a .PDN file in Explorer and then selecting "Print" would not work if Paint.NET was already open
  • Fixed over 10 user-reported crash bugs
  • Fixed several out-of-memory crashes
  • Fixes for many other miscellaneous, mostly minor, bugs

    You can download it at

    [Via Rick Brewster's blog]

  • Monday, November 27, 2006

    XML Notepad 2007

    XML Notepad 2007 provides a simple intuitive user interface for browsing and editing XML documents.



    • Tree View synchronized with Node Text View for quick editing of node names and values.
    • Incremental search (Ctrl+I) in both tree and text views, so as you type it navigates to matching nodes.
    • Cut/copy/paste with full namespace support.
    • Drag/drop support for easy manipulation of the tree, even across different instances of XML Notepad and from the file system.
    • Infinite undo/redo for all edit operations.
    • In place popup multi-line editing of large text node values.
    • Configurable fonts and colors via the options dialog.
    • Full find/replace dialog with support for regex and XPath.
    • Good performance on large XML documents, loading a 3mb document in about one second.
    • Instant XML schema validation while you edit with errors and warnings shown in the task list window.
    • Intellisense based on expected elements and attributes and enumerated simple type values.
    • Support for custom editors for date, dateTime and time datatypes and other types like color.
    • Handy nudge tool bar buttons for quick movement of nodes up and down the tree.
    • Inplace HTML viewer for processing xml-stylesheet processing instructions.
    • Built-in XML Diff tool.
    New features included in this version:
    • Added keyboard accelerators for find again (F3) and reverse find (SHIFT+F3).
    • Added support for loading IXmlBuilder and IXmlEditor implementations from different assemblies using new vs:assembly attribute.
    • Made source code localizable by moving all error messages and dialog strings to .resx files.
    • Added a default XSL transform.
    • New icons, a play on the Vista "Notepad" icons.


    Download XML Notepad 2007

    [Via Larkware News]



    Technorati tags: , ,

    System.Data: Export table to a CSV file

    In this post I will present a function that can be used to export a data table to a CSV file. The function first loops through the columns of the data table to export the names of all the data columns. And then in next loop the code iterates over each data row to export all the values in the table.

    /// <summary>
    /// Exports the table to CSV string.
    /// </summary>
    /// <param name="table">The table.</param>
    /// <param name="printHeaders">
    /// if set to <c>true</c> print headers.</param>
    /// <returns>CSV formated string</returns>
    private static string ExportTableToCsvString(
    DataTable table,
    bool printHeaders
    StringBuilder sb
    = new StringBuilder();

    if (printHeaders)
    //write the headers.
    for (int colCount = 0;
    < table.Columns.Count; colCount++)
    if (colCount != table.Columns.Count - 1)

    // Write all the rows.
    for (int rowCount = 0;
    < table.Rows.Count; rowCount++)
    for (int colCount = 0;
    < table.Columns.Count; colCount++)
    if (colCount != table.Columns.Count - 1)
    if (rowCount != table.Rows.Count - 1)

    return sb.ToString();

    Technorati tags: , , ,

    Sunday, November 26, 2006

    Free open-source e-mail server

    hMailServer is a free, open source, GPL-licensed e-mail server for Microsoft Windows. It supports all the common e-mail protocols (IMAP, SMTP and POP3) and comes with an easy-to-use COM library that can be used for integration with other software.

    Download hMailServer


    [Via LarkWare News]

    Technorati tags: , , , ,

    Monday, November 20, 2006

    Powershell Analyzer

    Powershell Analyzer is a rich interactive environment for Windows Powershell. Its goal is to be the powershell host of choice for IT professionals and system administrators. It has all the typical editor and IDE functionality that you would expect when working on a modern language, but it focuses on the real time interactive experience as if you were at the console, helping you compose the commands you want to use, and also giving you rich graphical visualization of the results. Powershell may seem to just return text like the average Unix shell, but in reality, it is returning rich self describing Dotnet objects.  Powershell Analyzer not only helps you with the INPUT, but also with the output.  It shows you the properties of the rich objects that the commands return, as well as specific visualizers to help you interact with output such as XML, HTML, charts, tables, and hierarchical data structures.

    Get the Latest build here:

    Friday, November 17, 2006

    ReSharper 2.5

    ReSharper 2.5 is a minor release dedicated to improving performance and stability of ReSharper 2.0. It will work for Visual Studio 2005 only. The following list of performance improvements and features will be available as part of the relase.


    1. Performance Improvements
      1.  Installation time
      2.  Typing
      3.  Code completion autopopup on typing identifier
      4. Updating completion list on typing
      5.  Typing when parameter information is shown
      6.  Showing parameter information with large number of signatures
      7.  Visual Studio startup
      8. Opening solution
      9. Opening single file in Visual Studio
      10.  Navigation inside a file which isn't currently open in Visual Studio
      11.  Live templates expansion
      12.  Typing with "Change All" or "Inline Rename" active
      13.  "Change All" quickfix
      14. Creating new files
      15.  Format code
      16.  Stepping in debugger
    2.  Features
      1.  Improved find results view (screenshot)
      2.  "Navigate From Here" – single shortcut for all navigational actions available at this point (screenshot)
      3.  Go to File Member — Control+F12 now allows navigation to symbols declared in the current file similar to Go To Type (Control+N) (screenshot)
      4.  Option page for disabling individual context actions
      5.  NullReferenceException analysis (screenshot)
      6.  More context actions and quickfixes
    3.  Experimental Read Only Visual Basic .NET support (note that this is experimental functionality and it might not be included in 2.5 release if we are not able to make it production quality by the time of release)
      1.  Navigation & search features (go to declaration, base, inheritor(s); find usages; go to type/file; etc.)
      2.  Matching brace highlighting
      3.  Extend selection (Control+W)
      4.  Quick documentation popup (Control+Q)
      5.  Parameter info (doesn't pop up automatically)
      6.  Identifier highlighting
      7.  Error highlighting

    In addition this release offers better user interface design (see screenshots) and significant stability improvements.


    From this page you can download the EAP builds for ReSharper 2.5.


    [Via Larkware News]

    A full set of professionally designed icons for ASP.NET applications.

    There are more than 300  awsome designed icons for your ASP.NET applications in this package. And, they all are completely free!You can use them in your web applications, both personal and commercial.

    Download ASP.NET Icons

    Windows PowerShell 1.0

    Windows PowerShell 1.0 is finally released.

    Download Windows PowerShell 1.0

    Don't forget to check out related resources like:

    Windows PowerShell FAQ

    Windows PowerShell Blog

    Remember to download the Windows PowerShell Documentation Pack that includes a Getting Started Guide, Quick Reference chart and a 100+ page Windows PowerShell primer.

    Monday, November 06, 2006

    Thursday, September 28, 2006

    Windows Live Writer 1.0 (Beta) Update with Windows Live Gallery

    Windows Live Writer is a desktop application that makes it easier to compose compelling blog posts using Windows Live Spaces or your current blog service. 


    The following is a summary of the changes in the Writer 1.0 (Beta) Update:

    • Tagging support
    • Support for Blogger Beta
    • Categories are sorted by name and support scrolling, plus improved support for reading categories from your blog
    • Improved startup performance
    • Paste is enabled for Title region and TAB/SHIFT+TAB navigation between title and body supported
    • Insert hyperlink added to context menu when text is selected
    • Title attribute in Insert Link dialog
    • Custom date support for Community Server
    • Improved keyboard shortcuts for switching views
    • Change spell-check shortcut key to F7
    • Add ‘png’ to insert image dialog file type filter
    • More robust image posting to Live Spaces
    • Improved style detection for blogs 
    • Fixed issues with pasting URLs and links
    • Remember last window size and position when opening a new post
    • Open post dialog retrieves more than 25 old posts

    Download Windows Live Writer 1.0 (Beta) Update



    Technorati tags: , , ,

    Friday, September 22, 2006

    visionapp Remote Desktop (vRD 1.4)

    vRD is a tool which allows the management of RDP connections to servers. vRD is ideal for administrators who need to maintain simultaneous connections to multiple servers. Connection-specific settings and login credentials can be organized in folders and subfolders for quick access.

    The new version 1.4 further extends the ease of use. Coming, amongst others, with a dynamic overview tab page over all established connections, the ability to choose the session window size through a drop down field and providing the option to set the RDP port, vRD offers many new features for hassle-free handling of multiple RDP connections.


    Download visionapp Remote Desktop 1.4

    Sunday, September 03, 2006

    Memory Management

    Automatic memory management is one of the services during Managed Execution that makes a developer's life a bit easier. Developers do not have to worry about freeing objects when they are no longer used, since the garbage collector takes care of that. The garbage collector determines which objects have no references and can therefore be released from memory. This prevents many problems such as forgetting to free objects from memory, causing memory leaks or attempting to access memory that has already been released.
    The problem with automatic memory management
    The automatic memory management technique is not perfect. As explained above, an object can be collected by the garbage collector when the object has no more references. It's logical that a button will not be collected when a form still knows it's there, but there are other references that a programmer might not expect, that also keep an object alive.
    An eventhandler can be such a reference that it will prevent the object from being collected. Another example is using a static collection object to register certain object instances. These instances will never be collected since the collection always has a reference to them. An IMessageFilter to handle window messages also has the same collection problem.
    The solution
    To prevent this kind of problems,
    qios has created a system that uses WeakReferences to attach to events, collection members, and IMessageFilters. A WeakReference is a reference to an object that will allow it to be garbage collected.

    To read more about our solution to these problems, check out a free and open source sample and libary available for download.You are allowed to use the MemoryPack library in your own applications without any costs.

    Monday, August 28, 2006


    SyntaxColor4Writer is a plugin for Windows Live Writer that enables you to embed syntax highlighting in your blog posts. This plugin uses an excellent component called Code Highlighter . The following syntax languages are included and can be customized and extended:

    • C#
    • CSS
    • HTML
    • INI File
    • Java
    • JScript  
    • Perl
    • PHP
    • Python
    • SQL
    • VB.NET
    • VBScript
    • XML

    Download & Installation



    Technorati Tags: 

    Monday, August 21, 2006

    Monopix-Live CD Linux distribution


    Monoppix is a Live CD Linux distribution (based on Knoppix), which means you pop it in your CD drive, reboot, and you're running Linux. It works without installing a thing on your hard drive - it runs completely off the CD and RAM.

    What's on the CD?

    - Mono runtime environment, complier and class libraries
    - Monodevelop - Mono enabled IDE
    - XSP - ASP.NET web server
    - GTK# - for desktop applications (sample included)
    - MySQL database server
    - Quickstarts and Mono walkthroughs and tutorials,

    How to get started?

    - Download the latest ISO.
    - Burn the ISO to a bootable CD.
    - Reboot your computer with the mono CD and CDRom boot enabled in your bios.

    Saturday, August 12, 2006

    How can I make the SplitContainer continuously update its contents while the splitter is moving?

    Note: Continuously updating a SplitContainer's contents can lead to poor performance, and should be used sparingly.
    By default, when moving a SplitContainer's splitter a preview is shown of the splitter's future location. Then when the splitter is released, the SplitContainer resizes to that position. If you want the SplitContainer to be constantly resizing as the splitter is moving, you can do one of two things:

    Insert the following code in your project, and attach these events to all of the SplitContainers that you want to continuously update.

    private void splitContainer_MouseDown(object sender, MouseEventArgs e)
    // This disables the normal move behavior
    ((SplitContainer)sender).IsSplitterFixed = true;

    private void splitContainer_MouseUp(object sender, MouseEventArgs e)
    // This allows the splitter to be moved normally again
    ((SplitContainer)sender).IsSplitterFixed = false;

    private void splitContainer_MouseMove(object sender, MouseEventArgs e)
    // Check to make sure the splitter won't be updated by the
    // normal move behavior also
    if (((SplitContainer)sender).IsSplitterFixed)
    // Make sure that the button used to move the splitter
    // is the left mouse button
    if (e.Button.Equals(MouseButtons.Left))
    // Checks to see if the splitter is aligned Vertically
    if (((SplitContainer)sender).Orientation.Equals(Orientation.Vertical))
    // Only move the splitter if the mouse is within
    // the appropriate bounds
    if (e.X > 0 && e.X < ((SplitContainer)sender).Width)
    // Move the splitter
    ((SplitContainer)sender).SplitterDistance = e.X;
    // If it isn't aligned vertically then it must be
    // horizontal
    // Only move the splitter if the mouse is within
    // the appropriate bounds
    if (e.Y > 0 && e.Y < ((SplitContainer)sender).Height)
    // Move the splitter
    ((SplitContainer)sender).SplitterDistance = e.Y;
    // If a button other than left is pressed or no button
    // at all
    // This allows the splitter to be moved normally again
    ((SplitContainer)sender).IsSplitterFixed = false;

    Technorati : , , ,

    Friday, August 11, 2006

    Why are user scoped settings present in the app.config?

    The configuration system is hierarchical and has the following ordering:

    Machine à Application à Roaming User à Local User

    When you query a configuration section at any level, you get a merged view of the sections declared in that level and those below it (with machine being the lowest level and local user the highest). The section handler defines how the merge happens and for settings, a setting value specified in, say, local user config trumps the one specified in application config.

    So for user scoped settings, you can think of the values specified in app.config to be install time defaults. When the settings are saved into user.config, those values will override these defaults. This way admins have the option of changing the defaults. Note that the defaults can also be specified by means of a DefaultSettingValueAttribute. The provider will use this value if no value is specified for a setting in any level of config.

    Technorati : ,

    How are my strongly typed properties serialized as settings?

    There are two primary mechanisms that ApplicationSettingsBase uses to serialize settings:

    1. If a TypeConverter exists that can convert to and from string, it is used.

    2. Otherwise, the XmlSerializer is used.

    Are there multiple config files for an application or just one?

    The default SettingsProvider for client applications (called the LocalFileSettingsProvider) stores settings in the application configuration files. In .NET v1 and v1.1, there were two levels of config files - machine.config and app.exe.config (where 'app.exe' is the name of the application). In v2.0, we have added two more levels of configuration to store user specific data - one that goes in the roaming user profile path and another in the local user profile path. On XP, the profile directories would be something like 'c:\Documents and Settings\<username>\Application Data' and 'c:\Documents and Settings\<username>\Local Settings\Application Data' respectively. These directories are the recommended location (per Windows Logo requirements) for storing user specific information, and most applications (like Outlook and Visual Studio) put user data somewhere under here.

    Technorati : , ,

    How do I know when to call Upgrade in a non-Clickonce app?

    In non-Clickonce cases, there is no automatic upgrade - you have to call Upgrade yourself. Here is one idea for determining when to call Upgrade:
    Have a boolean setting called CallUpgrade with a default value of true. When your app starts up, do the following:

    if (Properties.Settings.Value.CallUpgrade)
    Properties.Settings.Value.CallUpgrade = false;
    This will ensure that Upgrade( ) is called only the first time the application runs after a new version is deployed.

    Technorati : , , ,

    How do I know when to call Upgrade in a Clickonce app?

    In Clickonce, when you install a new version of your application, ApplicationSettingsBase will detect it and automatically upgrade settings for you at the point settings are loaded.

    Technorati : , , ,

    If I deploy a new version of my application, will the user lose all the settings saved by the previous version?

    It is easy to upgrade settings from a previous version of the application to the latest. Simply call ApplicationSettingsBase.Upgrade() and it will retrieve settings from the previous version that match the current version of the class and store them out in the current version's user.config file. You also have the option of overriding this behavior either in your settings class or in your provider implementation.

    Technorati : , ,

    Where is the user.config file located if I deployed my application using Clickonce?

    The path algorithm mentioned above is not used in the Clickonce case. Instead, the local user.config file goes in the Clickonce Data directory (the <Version> part of the path will still be included). There is no roaming user.config file for Clickonce applications.

    Technorati : , ,

    Wednesday, July 19, 2006

    Why doesn’t the debugger catch exceptions in webBrowser events?

    Since the core of the managed WebBrowser is an unmanaged ActiveX control, it captures all exceptions thrown in its methods before they can be passed to the debugger. This can lead to unusual behavior if you are not catching the exceptions before they leave the method. For this reason it is highly recommended that try catch blocks should be placed around the contents of all WebBrowser methods during the development and test phases, with special attention paid to procedures that could potentially throw exceptions.

    Technorati : , ,

    Does the WebBrowser control work in Partial Trust?

    The WebBrowser control does not work in partial trust. This class makes security demands at the class level, therefore a SecurityException is thrown when a derived class or any caller in the call stack does not have full trust permission. For details about security demands, see Link Demands and Inheritance Demands.

    Technorati : , , ,

    WebBrowser FAQ:How do I get the site of a new window?

    To get the Url that the WebBrowser is navigating to in a new window, use DWebBrowserEvents2::NewWindow3. This method is not exposed by IntelliSense. For information on how to use it, see: for an implementation.

    Technorati : , ,

    How do I navigate to a Url that contains escape characters?

    To navigate to an addresses that contains escaped characters (such as %20) be sure to use the webBrowser.Navigate(String) method instead of the webBrowser.Navigate(Uri) method. The Uri method escapes these characters by default, while the String method does not.

    Technorati : , ,

    How do I block popups?

    To block pop-ups, use the following registry key:
    Internet Explorer
    For more information on this topic, see

    Technorati : , ,

    Why won’t the WebBrowser navigate?

    Be sure that AllowNavigation is set to true. This property not only prevents users from making the WebBrowser navigate, but also prevents the WebBrowser from programmatically being given a new Url.

    WebBrowser FAQ:How can a control in the browser access the DOM of the page that is hosting it?

    For an example of this, see

    Technorati : , ,

    WebBrowser FAQ:How do I get XP SP2 Security features?

    To control XP SP2 security features, you can set various registry keys. For detailed information, see:

    Technorati : , ,

    Wednesday, May 17, 2006

    HitTestInfo Overview

    Sometimes in applications you may need to recognize which element is located at the specified screen coordinates. For instance, you may have to determine which part of a DataGridView the user has clicked or double-clicked. For this purpose, DataGridView implements the HitTest method.

    For demonstrative purposes on how to process data provided by a HitTestInfo object, you can make use of the following example. It handles the DataGridView.MouseMove event and shows information about a part under the mouse cursor.

    private void dataGridView1_MouseMove(object sender, MouseEventArgs e)


    System.Windows.Forms.DataGridView.HitTestInfo hitInfo = dataGridView1.HitTest(e.X, e.Y);


    // displaying dataGridView related information defined a point under the mouse cursor

    listBox1.Items.Add("Point: " + new Point(e.X, e.Y) );

    listBox1.Items.Add("Type: " + hitInfo.Type.ToString());

    listBox1.Items.Add("ColumnIndex: " + hitInfo.ColumnIndex);

    listBox1.Items.Add("RowIndex: " + hitInfo.RowIndex);

    if (hitInfo.ColumnIndex != -1)


    DataGridViewColumn column = dataGridView1.Columns[hitInfo.ColumnIndex];

    listBox1.Items.Add("Column Caption: " + column.DataPropertyName );




    listBox1.Items.Add("No Column");



    Technorati : , , , , ,
    Ice Rocket : , , , , ,

    Sample of Using HitTestInfo Object

    The following sample demonstrates how to implement the grid row's popup menu. This menu has only one item, which deletes the row that the menu has been called for. The HitTest method is called to obtain the row position. Selection is then moved to this row and the custom context menu called.

    private void dataGridView1_MouseDown(object sender, MouseEventArgs e)


    System.Windows.Forms.DataGridView.HitTestInfo hitInfo = dataGridView1.HitTest(e.X, e.Y);

    if ( (hitInfo.Type == DataGridViewHitTestType.Cell) &&

    ((e.Button & MouseButtons.Right) != 0) )


    // switch selection

    DataGridViewRow selectedRow = dataGridView1.Rows[hitInfo.RowIndex];

    selectedRow.Selected = true;

    //show the context menu

    ContextMenuStrip contextMenu = new ContextMenuStrip();

    contextMenu.Items.Add("Delete Row", null, new EventHandler(DeleteSelectedRow) );

    contextMenu.Items[0].Tag = selectedRow;

    contextMenu.Show(this.dataGridView1, e.X, e.Y);



    private void DeleteSelectedRow(object sender, EventArgs e)


    ToolStripItem menuItem = sender as ToolStripItem;

    if (menuItem != null)







    Technorati : , , , , ,
    Ice Rocket : , , , , ,

    UML Resource List

    Collection of UML links

    O'Reilly - Learning UML v2.0 Apr 2006
    Understanding UML Wiki
    Understanding UML Blog

    Technorati : , , , ,
    Ice Rocket : , , , ,

    IDE for your thoughts - wikidPad

    "wikidPad is a wiki-like notebook for storing your thoughts, ideas,
    todo lists, contacts or anything else you can think of that's
    important. What makes wikidPad different from other notepad or
    outliner applications is the ease with which you can cross-link your

    WikidPad Features

    • On the fly WikiWord linking, as you type
    • WikiWord auto-completion
    • Easy WikiWord navigation
    • Wiki text styling
    • WikiWord History
    • Wiki document attributes
    • Dynamic views
    • Tree/Outline view with over 100 icons
    • Todo lists
    • Incremental search
    • Search and Replace
    • Autosave
    • Export to HTML
    • All your data is stored in plain text
    • URL and file linking
    • Intuitive keybindings
    • Help Wiki included

    Visit the project homepage

    Technorati : , , , , ,
    Ice Rocket : , , , , ,

    Tuesday, May 16, 2006

    Microsoft's new open source hosting solution - CodePlex.

    CodePlex is an online software development environment for open and shared source developers to create, host and manage projects throughout the project lifecycle. It has been written from the ground up in C# using .NET 2.0 technology with Team Foundation Server on the back end.


    • Release Management
    • Work Item Tracking
    • Source Code Dissemination
    • Wiki-based Project Team Communications
    • Project Forums
    • News Feed Aggregation

    Visit CodePlex

    Technorati : , , , ,
    Ice Rocket : , , , ,

    Universal Debugger Visualizer in Visual Studio 2005.

    Visual Studio 2005 shipped with a very helpful feature called debugger visualizers.Debugger visualizers allow you to view useful information about objects during debug.This visualizer is helpful for anyone writing an application and want to view or change objects properties during runtime.

    using System;

    using System.Collections.Generic;

    using System.Diagnostics;

    using System.Text;

    using Microsoft.VisualStudio.DebuggerVisualizers;

    using System.Windows.Forms;

    using System.Drawing;

    namespace Devintelligence.Debug


    /// <summary>

    /// Visual Studio visualizer for viewing objects

    /// in PropertyGrid during debug.

    /// </summary>

    public class UniversalVisualizer : DialogDebuggerVisualizer


    protected override void Show(IDialogVisualizerService windowService,

    IVisualizerObjectProvider objectProvider)


    object data = objectProvider.GetObject();

    using (Form form = new Form())


    form.Text = data.GetType().FullName;

    form.ClientSize = new Size(230, 300);

    form.FormBorderStyle = FormBorderStyle.FixedToolWindow;

    PropertyGrid propGrid = new PropertyGrid();

    propGrid.SelectedObject = data;

    propGrid.Parent = form;

    propGrid.Dock = DockStyle.Fill;


    objectProvider.ReplaceObject( propGrid.SelectedObject );



    // TODO: Add the following to your testing code to test the visualizer:


    // UniversalVisualizer.TestShowVisualizer(new SomeType());


    /// <summary>

    /// Tests the visualizer by hosting it outside of the debugger.

    /// </summary>

    /// <param name="objectToVisualize">

    /// The object to display in the visualizer.</param>

    public static void TestShowVisualizer(object objectToVisualize)


    VisualizerDevelopmentHost visualizerHost =

    new VisualizerDevelopmentHost(objectToVisualize,






    I overrode the method Show. This method gets two parameters: objectProvider holds a serialized copy of the debugged object we want to view or change properties, windowService allows us to show a dialog form under the context of the Visual Studio IDE. In this method, I created a form with a property grid and loaded the object into it.

    Here's screenshot of the Universal Visualizer in action.
    Universal Visualizer

    Technorati : , , , , , ,
    Ice Rocket : , , , , , ,

    PS Hot Launch

    PS Hot Launch

    PS Hot Launch lets you open multiple programs, documents, folders, and web sites with the click of your mouse or by defining keyboard shortcuts.

    This type of program is perfect if you find that you always need to launch multiple applications when you are getting started with different tasks.


    • Quick launch of programs from the menu in the system tray.
    • Quick launch of programs using hot keys.
    • Logical grouping of commands.
    • Using separators to make the menu handier.
    • Quick and handy set-up using drag&drop

    Download PS Hot Launch

    [Via LifeHacker]

    Technorati : , , ,
    Ice Rocket : , , ,

    Monday, May 15, 2006

    Easy Picture2Icon

    Easy Picture2Icon is a wonderful tool for converting images or digital photos in to Windows icons. Easy Picture2Icon make it possible to use any graphical editor to produce icons.Easy Picture2Icon has support for making transparent icons and the user can choose which color to make transparent. With this picture to icon converter it is possible to make icon files that contain multiple icons of different sizes.


    • Images formats that can be converted to Windows icons (.ico files) are:
    • True color icons.
    • Single image icon file.
    • Multiple icons in one Windows icon file.
    • Transparent color icons.
    • User choused transparent color.
    • Image edge cutting to fit icon function.
    • Image resize to fit icon function.
    • The supported icon sizes are 16x16, 32x32 and 48x48

    Download Easy Picture2Icon

    Technorati : , , , , ,
    Ice Rocket : , , , , ,

    Sunday, May 14, 2006

    Google Co-op

    "Google Co-op is about sharing expertise. You can contribute your expertise and benefit when others do the same. Help other users find information more easily by creating "subscribed links" for your services and labeling webpages around the topics you know best."

    Google Co-op Features:

    • Personalized search results, where you can subscribe to content providers like Digg
    • "Free AdWords" from Google for those who help refine searches
    • The "onebox" for the masses
    • Finally, cluster search results
    • A sort of semantic web, only that some of the data is stored not on your webserver, but on Google's server (an important distinction, I think - the competition can't access this meta-data, and it's a bit of a Google lock-in!)
    • Google becoming a meta search engine, an aggregator of other specialized search engines
    • Meta-keywords 2.0 - the trust is build into Google's account system to prevent spamming
    • Social bookmarking and tagging a la

    [Via Philipp Lenssen]

    Technorati : , , , , , ,
    Ice Rocket : , , , , , ,

    Thursday, May 11, 2006

    Windows Firewall Site

    A new Windows Firewall Site has been published, providing a central location for all the published resources on the Windows Firewall provided with Windows XP , Windows Server 2003, Windows Vista and Windows Server "Longhorn".

    [Via Joe Davies's WebLog]

    Technorati : , , ,
    Ice Rocket : , , ,

    Wednesday, May 10, 2006

    Wait control for ASP.NET

    BusyBoxDotNet is a very useful ASP.NET user control for your web pages.

    "BusyBoxDotNet is an ASP.NET web control library. It is built for ASP.NET 1.1 but it is fully compatible with ASP.NET 2.0 and will soon be written especially for it.
    The main control is the BusyBox control, which can be used to show a customizable box inside web pages during time consuming activities, a very useful behavior especially during long processing tasks, in order to inform the user that something is actually happening. Typical time consuming tasks are file uploads, complex queries against databases, heavy load operations in application code, or heavy pages which require some time to be rendered by the browser.
    Among the new features, there's the option to show it on page loads, in case the pages takes a while to load and you want to notify the user that the loading process is still going."

    BusyBoxDotNet Features:

    • Ease of integration: no need to write javascript code, stylesheets or HTML, everything is embedded in a simple drag and drop control.
    • Cross browser compatibility . Tested with actual versions of Firefox/Mozilla, Internet Explorer, Opera, Netscape Navigator.
    • Many customization options.

    Get BusyBoxDotNet

    Download animated images to use with BusyBoxDotNet. (1) (2)

    Generate animated gifs on the fly, customizing shape, fore color and background color to use with BusyBoxDotNet. (1)

    Technorati : , , , ,
    Ice Rocket : , , , ,

    Tuesday, May 09, 2006

    Microsoft Bloggers List

    [Via Blake Handler's Blog]

    Technorati : , , , ,
    Ice Rocket : , , , ,

    Internet Logger v1.1

    Save both incoming and outgoing Internet traffic (all data sent or received by browser: Internet Explorer, FireFox, Opera; email client: Outlook, Thunderbird; instant messenger: MSN, Yahoo, AOL, ICQ, Skype; media player and etc.) on the hard drive for future use.

    Download Internet Logger(124 Kb)

    Technorati : , ,
    Ice Rocket : , ,

    HTTP Debugger

    Capture, analyze and debug all HTTP communications between the web browser on the client side and the web server on the other side. Internet software developers can use HTTP Debugger to analyze the communication between their programs and Internet.

    Each HTTP transaction can be examined to see the HTTP header parameter values, cookies, query strings, error codes and etc. All captured network traffic can be saved either in RAW network format or decoded (how browsers see it) format.

    HTTP Debugger works with all today's alternative browsers and their plugins, as well as with your own software. You can even monitor and debug ICQ, MSN, Yahoo Messenger and other popular Internet programs.

    • Monitor and debug all outgoing HTTP requests from a browser (or any other selected program) and corresponding responses from a server.
    • See the full header and content data of both: HTTP requests and responses.
    • Catch when the browser performs automatic redirects.
    • Capture requests from all of the installed plugins (Flash, ActiveX, etc.) in addition to requests sent by a browser directly. Analyze the same page in all modern browsers simultaneously.
    • Measure the size and downloading time of your web pages to optimize the performance of your web site.
    • The gzip and chunked encodings will be automatically processed by the program.
    • View information supplied by each web browser or any program when you visit a site.
    • Analyze how other sites work and how they implement certain features.
    • Learn about how HTTP works (useful for programming and web design cases).

    Download HTTP Debugger (240 Kb)

    Technorati : , , , , ,
    Ice Rocket : , , , , ,