All Tags » Windows (RSS)

Browse by Tags

  • IE and Windows XP

    We had a weird error with IE 6 in our web site. In order to figure out the issue, it required going back to IE 6, from IE 8. In order to do that, you can simply go to the control panel, add/remove programs, and unintall internet explorer. Rather than uninstalling it completely, it rolls back the version...
    Posted to Brian Mains Blog (Weblog) by bmains on 05-22-2009
  • Handling Event Notification - An Alternative Approach

    I remember reading about an approach to create an Object-Oriented API for an application, similar to Visual Studio, using documents, tool windows, menu items, and other objects. The approach was to create events for each transaction and have these events bubble up to the parent. However, to me this seemed...
    Posted to Brian Mains Blog (Weblog) by bmains on 11-11-2007
  • Wrapping Text in a DataGridView

    I thought that wrapping text in a datagridview would be a problem, but it turned out to be really simple. All you have to do is to change a setting in the DefaultCellStyle. This property represents a style of the cell, and has a WrapMode object, which by setting to true, means that text within the cell...
    Posted to Brian Mains Blog (Weblog) by bmains on 07-05-2007
  • ComboBox FlatStyle Bugs

    I've been working with the combobox, and it appears that the FlatStyle property has some bugs in how it renders the combobox. When setting the property to FlatStyle.Flat, it doesn't render correctly when using anchoring to resize the item; instead, you can see two items, one with the original...
    Posted to Brian Mains Blog (Weblog) by bmains on 10-17-2006
  • Web Browser Control

    .NET 2.0 has a WebBrowser control for windows development. Using this control, you can request and view HTML content parsed as you would see it in IE or Firefox. It's really simple to use; pass a Uri to the Navigate method, and it navigates to both http sites, as well as local HTML content (I passed...
    Posted to Brian Mains Blog (Weblog) by bmains on 10-15-2006
  • Given Expression is Never of the Provided Type

    When using generics, and you get an error "Given Expression is Never of <X> Type", it is usually how it is assigned. For example, I was trying to do this: public IInterface<T> CreateProvider<T>() { if (typeof(T) is ObjectA) return new ObjectAProvider() as IInterface<T>;...
    Posted to Brian Mains Blog (Weblog) by bmains on 10-04-2006
  • Application Frameworks

    Recently, I've been seeing the value of application frameworks, like the Membership and Roles frameworks. Having the capabilities for your application, custom controls, and other objects to work together through a common API, components working together provide some business value. For instance, in an...
    Posted to Brian Mains Blog (Weblog) by bmains on 08-11-2006
  • IFormattable Interface

    IFormattable is an interface that defines a version of a ToString method that include a format, and a format provider, if necessary. Within the method is a series of if statements, determining whether the format provide is null. If it isn't, it gets an instance of the formatter that will do the work...
    Posted to Brian Mains Blog (Weblog) by bmains on 08-07-2006
  • Rendering Control Text in Windows Applications

    I had a custom control that I was using to render a series of text; however, it had a marking container on the side that you can click to mark a "verse" (the business object) in the collection of verses. The collection that I use can be cast to IEnumerable, so I use it as a common denominator, so that...
    Posted to Brian Mains Blog (Weblog) by bmains on 08-06-2006
  • Developing an Object Model for Win Apps - Common Functionality

    What about the common functionality, like Quitting? The Manager static class has a Quit method. When called, it invokes the OnQuitting method, to see if any class or other object still needs to use the application; for instance, if the user is still editing the form, this may cancel the close. This uses...
    Posted to Brian Mains Blog (Weblog) by bmains on 08-06-2006
Page 1 of 2 (19 items) 1 2 Next >