June 2003 - Posts

I know TechEd 2003 is still starting (and I am NOT there :-( ), but for me this is great news: next year TechEd will be in Amsterdam! Thanks Patrick, for the news! Since I live in Belgium (near the Netherlands) my company HAS TO LET ME ATTEND IT! I hope my manager reads this... ;-)

Today my article about Collections in .NET was published on the MSDN Belux site. The article is the first of two about the collection classes in the .NET Framework:
<quote>
When you lookup the System.Collections namespace in the MSDN Library, you will find over 10 different classes. Choosing the right one for using in your application can be hard. This article will provide an overview and give some guidelines for choosing the right collection. The next article in this series will focus on building custom strongly typed collections and applying advanced techniques on them, such as data binding and sorting.
</quote>

The level of the article is "Beginners - Intermediates", so if you're intrested... Let me know what you think about the content!

The Hippo.NET BuildFile Builder is updated and can now generate NAnt build files for VB.NET and C# Visual Studio projects.

The BuildFile Builder is a part of the Hippo.NET Build Tool that is still in beta. For more information, see my previous post. I would appriciate feeback if you have problems or find bugs on this site.

One of the complaints that I've received about using the Hippo.NET Build tool, is the fact that you manually have to write your own NAnt build file. So one of the features I want to implement in the next release of Hippo.NET, is either generating buildfiles on the fly, or providing  a tool to easily generate buildfiles based on the Visual Studio project file. That's why I've created the Hippo.NET BuildFile Builder (what's in a name ;-). On this site, you can generate NAnt buildfiles, based on a Visual Studio project file. You simply browse to your project file on your local harddisk and press the Generate button and a the contents of a NAnt buildfile are generated.

If you are intrested you can visit the Buildfile Builder site and give it a try. If you have comments, remarks, bug reports, ... please let me know! Just keep in mind that this is a very early beta and some improvements are comming in the next few days.

A few weeks ago, I posted a macro to improve the Intellisense of Visual Studio. This macro automates the lookup of namespaces (AddDirective methode). For example when you type "Dim r As XmlReader", you probably need to add the "Imports System.Xml" (or "using System.Xml;" in C#) statement to your code. This macro helps you by searching for the corresponding namespace and add it to your code automatically. Additional there is a macro function (AddNamespace method) that replaces "xmlreader" with "System.Xml.XmlReader", so it just adds the namespace in front of your type.

Thanks to a tip of Yves Hanoulle, there is now one single function that adds the using/Imports directive for both VB.NET and C#.

The macro works great if you assign a shortcut key to it, you can do that like this:
  • Enter or copy-and-paste the macro code in the Macro Editor of Visual Studio.
  • Choose in the Tools menu the Customize menu item.
  • Press the Keyboard button (below right).
  • In the list of the commands, find Macros.MyMacros.TypeFinder.AddDirective, and select it.
  • In the textbox "Press shortcut key(s)", press the key combination you want to use. (I use Ctrl+`)
  • Change the "Use new shortcut in:" value to "Text Editor"
  • Press the Assign button.
Let me know if you have any remarks, problems, ... The complete source code of the macro is:

Imports EnvDTE

Imports System.Diagnostics
Imports System

Public Module TypeFinder
Private Function SearchTypeInAssembly(ByVal typename As String _
, ByVal ass As Reflection.Assembly)
DTE.StatusBar.Text = "Searching for '" & typename & "' " & _
ass.GetName.Name & "..."
Dim t As Type
For Each t In ass.GetTypes
If t.Name.ToLower = typename Then
Return t
End If
Next
End Function
Private Function SearchType(ByVal typename As String) As Type
typename = typename.ToLower
Dim projs As System.Array = DTE.ActiveSolutionProjects
Dim ass As Reflection.Assembly = _
Reflection.Assembly.LoadWithPartialName("mscorlib")
Dim t As Type = SearchTypeInAssembly(typename, ass)
If Not t Is Nothing Then Return t
Dim proj As Project
For Each proj In projs
Dim o As VSLangProj.VSProject = proj.Object
Dim ref As VSLangProj.Reference
For Each ref In o.References
ass = Reflection.Assembly.LoadFile(ref.Path)
t = SearchTypeInAssembly(typename, ass)
If Not t Is Nothing Then Return t
Next
Next
DTE.StatusBar.Text = "Could not find type '" & typename & _
"' in the referenced libraries. Make sure your cursor " & _
"is right behind the text (without selection)!"
DTE.StatusBar.Highlight(True)
Return Nothing
End Function
Public Sub AddNamespace()
Dim text As TextSelection = DTE.ActiveDocument.Selection
text.WordLeft(True)
Dim t As Type = SearchType(text.Text)
If Not t Is Nothing Then
text.Text = t.FullName
text.EndOfLine()
DTE.StatusBar.Text = "Ready"
End If
End Sub
Public Sub AddDirective()
Dim text As TextSelection = DTE.ActiveDocument.Selection
text.WordLeft(True)
Dim t As Type = SearchType(text.Text)
If Not t Is Nothing Then
Dim keyword, suffix As String
Dim line As Integer = text.AnchorPoint.Line
text.Text = t.Name
text.StartOfDocument()
Select Case DTE.ActiveDocument.Language
Case "CSharp"
keyword = "using"
suffix = ";"
Case "Basic"
keyword = "Imports"
suffix = String.Empty
Case Else
Throw New System.Exception("Invalid Language: " & _
DTE.ActiveDocument.Language)
End Select
text.Insert(keyword & " " & t.Namespace & suffix & vbCrLf)
text.MoveToLineAndOffset(line + 1, 1)
text.EndOfLine()
DTE.StatusBar.Text = "'" & keyword & " " & t.Namespace & _
suffix & "' added to the document."
DTE.StatusBar.Highlight(True)
End If
End Sub
End Module




Recently I added a counter to the Hippo.NET home page. I nifty feature of that counter is that it can track referrers. I discovered 2 articles about Hippo.NET:

So there are people intrested in Hippo.NET! Keep the feedback comming!

A few days ago I asked for some feedback about the Hippo.NET build tool. For now, there are a couple of intresting feature requests and remarks:

  • Installation and configuration documentation.
    With the release of the next Hippo.NET version, a well documented installation and configuration document will be made. I'm even thinking about creating a small configuration tool that allows editing of the configuration files.
  • Alternative for the server service.
    Steve mentioned this request and I think it's very usefull! So in the next version, there you will be able to choose which type of server component you want to use. So if you only want to test Hippo.NET, or you don't want to install the service, you can use an Windows Forms application that acts as a server.
  • Code cleanup.
    Yves mentioned during a IM chat that several controls of the Hippo.NET client were not renamed. So the code will be reviewed and cleaned.

If you have any more requests, remarks, ... please let me know. I'm also very intrested in how many people actually use this project. The SourceForge stats show around 150-200 pageviews each day and around 10 downloads each day (due to some problems at SourceForge recent download stats are not available). So I'm curious about how many of you have tried it... Thanks for all of you who provided feedback!

Seems MS is a little bit slow with updating the sites mentioned in their press release, but you can download it from this link.

[Update] Cool, I'm using "Neo" as graphic (there isn't a .NET logo available yet ;-):

IM me @ jan@leadit.be.

You can get more graphics and smileys at www.mess.be.

According to this press release, Microsoft will release MSN Messenger 6 preview at 11 am PDT here.


MSN Messenger 6 also offers innovative features that allow users to do the following:

  • Choose a personalized background from a wealth of options such as cartoons, sports or international locations; create their own background from favorite photos or logos; and share favorite background themes with IM contacts
  • Select customized display pictures of their favorite pet or celebrities or other pictures to represent themselves to contacts
  • Choose from more than 150 fonts and 16 colors of type to represent their personal style
  • Save favorite IM conversations to a personal hard drive with just one click via message logging

I hope this version will improve the webcam connections, since I experienced many problems with users behind firewalls (even UPNP). Fingers crossed ;-) ... Robert Scoble likes it.

Today I discovered that Patrick Verbruggen has a weblog. Patrick is one of the founding members of the Belgian .NET Usergroup (BENUG) and lives in Belgium. He has even made a list on the BENUG site of Belgian bloggers. So if there are any other Belgian .NET bloggers: please stand up!

Hippo.NET Feedback request update: Thank you Steve and Peter for your comments. Please more... ;-)

More Posts Next page »