Friday, March 10, 2006

One of the primary drawbacks to the 2.0 WebBrowser is that it doesn't seem to be as flexible as importing the ActiveX control directly.  However, Microsoft anticipated this and created a way to hook into the WB to make it as flexible as you like.  See the discussion here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=7228&SiteID=1

Friday, March 10, 2006 8:06:58 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
 Thursday, March 09, 2006

This is old news, but here is a very informative article I just now ran across:

Robert Gelb's Top 10 .NET Tips and Tricks (http://www.vbrad.com/article.aspx?id=66)

Thursday, March 09, 2006 10:16:57 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Tuesday, March 07, 2006

I ran across an interesting KB article today.  I had never seen the "::" notation in JavaScript before, but here it is:

function ctrl::ClickEvent(a,b)
{
   alert("MyWindowControl_ClickEvent");
}

This function will handle the "ClickEvent" .NET event that is exposed to script through an object tag:

    <OBJECT id="ctrl" classid="YourDllName.dll#ActiveXSourcing.MyWindowControl">
    </OBJECT>

For more, read KB313891

Tuesday, March 07, 2006 5:35:44 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, March 06, 2006

Note to self:  the January 2006 release of the MSDN library does not contain VS 2005 documentation.  You have to install "MSDN Library for Visual Studio 2005"!

Monday, March 06, 2006 11:21:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
 Thursday, January 19, 2006

David Hayden recently blogged about Asymmetric Accessor Accessibility in the CLR 2.0 version of C# and VB.NETIf you're not sure what it is, go read his post - it does a great job of explaining it.  Just glace at his first example and you'll know exactly what it is.  Anyway, this feature specifically caught my attention because (a) I had not heard of it before and (b) I just had a need for it yesterday but had no idea that it was possible in any language.  Unfortunately, we have not yet had the chance to convert our 1.1 code to 2.0, so it may be a while before I can get my hands on this functionality.

So in the interim, what's the next best solution?  I went with a public read-only property and a protected "setter" method.  What other ways could this be done?  Please comment!

    Private _busy As Boolean = False

    Public ReadOnly Property Busy() As Boolean

        Get

            Return _busy

        End Get

    End Property

    Protected Sub SetBusy(ByVal busy As Boolean)

        If busy <> _busy Then

            _busy = busy

            OnBusyChanged(EventArgs.Empty)

        End If

    End Sub

I would have preferred that the getter and the setter have the same name and be a part of the same property, but I guess I'll have to wait for 2.0 for that.

Thursday, January 19, 2006 3:56:54 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |