Archives / 2004 / June

1-10 of 12
  • Ken Getz's Great Article and a Couple Comments

    Saturday, June 26, 2004
    Ken's article has already been pointed out by a few folks, but I just wanted to point it out myself and say how great of an article this is.  As always, Ken's writing talents have been put to good use.  If you want to know about pretty much everything that's new in VB 2005, this should be your first stop. I do have a couple things I'd like to point though (other than the fact that it's a great read).  There is a place in it when he talks about how when writing a Catch now, it will filter the
    Filed under | 0 comments »
  • Bug in Array.Reverse?

    Thursday, June 24, 2004
    Let's say we have a Boolean Array. Dim Temp() As Boolean = New Boolean() {True, False, True} It would currently read like this: Temp(0) = TrueTemp(1) = FalseTemp(2) = True Now call Array.Sort on it (i.e. Array.Sort(Temp)) and it will now read like this: Temp(0) = FalseTemp(1) = TrueTemp(2) = True Great...that's what I'd expect it to return, but now on the original array, call Array.Reverse and it will now read like this: Temp(0) = TrueTemp(1) = FalseTemp(2) = True Nothing has changed from the original...not exactly what I'd except the results to be!  :P  If this isn't a bug,
    Filed under | 3 comments »
  • My Name is Erik Porter and I Make Mistakes and I'm prooooud of it!

    Friday, June 18, 2004
    If you read my blog at all, you know that my attitude towards blogging is very lax and whimsical.  I make spelling mistakes.  I make coding mistakes.  I talk about controversial coding debates.  I talk about something that totally ends up not being necessary.  You get the idea. Deep inside, I am in constant turmoil (with just about everything I do) about how much or how little I should censor, clean-up and perfect a blog entry before posting it.  The perfectionist in me keeps nagging, saying “Your entries are a reflection of you.  If you look like an idiot, people
    Filed under | 8 comments »
  • Overuse of WindowsForms Features

    Wednesday, June 16, 2004
    On my current project, I needed to have a User Control dumped out a variable amount of times in a Panel with AutoScroll set to True.  I thought hey, why not just write a loop to add each item to the Panel's Controls Collection and after adding each item set the Dock Property to Top.  After that I can do anything I want with spacing, like put some space in between each item.  Something like this in my loop seemed to work pretty well. With Item     .Dock = DockStyle.Top     With .DockPadding          .Left = 4          .Right = 4          If i >
  • Reverse Loop Indexer

    Wednesday, June 16, 2004
    This is a pretty specific case and pretty simple so I'm not sure anyone will get any use out of it (just simple math), but I thought it was interesting and would share (who knows, maybe I'll forget it and need to look it up again). In an application I'm working on right now, I store a list of parent items in a forward order.  When displaying calculations on child items of those parent items, I sometimes need to reverse their order inside the main parent loop (when printing them out).  For other purposes the child items are always in
  • Speech SDK 5.1 ListBox Sample .NET

    Tuesday, June 15, 2004
    Sunday night I finally got a chance to play around a bit with the Speech SDK.  Pretty cool stuff.  I thought first it would be a good idea just to check out some code.  Unfortunately, one of the samples I was interested in is in VB6.  I haven't had VB6 on any machine for 2 or 3 years and trying to read through the code files is really crappy!  :P  So I went ahead and installed another XP insance in Virtual PC and installed VB6 (whoa the memories  ;)) and check out the ListBox sample.  I figured it would help
    Filed under | 2 comments »
  • Multiple Attributes

    Monday, June 14, 2004
    One more quickie I just thought of, you can now in VB 2005 have multiple attributes on different lines. This will work in VB 2005, but not previous versions. <Attribute1()> _<Attribute2()> _Public Class TestEnd Class Previously, you'd have to do it like this... <Attribute1(), Attribute2()> _Public Class TestEnd Class Kind of cool!  :)  This way you can write it either way now and I'd imagine it makes it easier for code generation tools to dump out attributes.
    Filed under | 2 comments »
  • Property Setter and Getter Accessors

    Monday, June 14, 2004
    I see Scott talking about Using for VB in VS 2005 and thought I'd throw in another new thing (that I absolutely love and I think also works in C#, but I haven't had time to try it yet). Private _Test As String = ""Public Property Test() As String     Get          Return _Test     End Get     Friend Set(ByVal Value As String)          _Test = Value     End SetEnd Property So in this case, inside of my Class Library (the Assembly where my code sits), I can Read and Write to the Property (in case I happen to have any other logic in my setter)
    Filed under | 9 comments »
  • Quick WindowsForms Layout Tip

    Monday, June 14, 2004
    This may be categorized under the “Erik is a big idiot and should've known this” section and most people probably already know it, but I think it's one of those not so obvious things that may help some people. If you've ever dynamically created controls in WindowsForms like filling a Panel with user controls or something along those lines, you may have noticed some really ugly drawing when your form loads.  Almost as if it's redrawing every time a control is added.  At my last job on my first big project I tried calling the .Hide() Method (on the Panel
  • Speech SDK

    Friday, June 11, 2004
    So I decided to write a plug-in for Visual Studio doing some things with voice recognition (details coming later if I can find enough time to work on it) and went to check out the Speech Applicaton SDK 1.0.  Turns out that is for developing Telephony and ASP.NET applications.  The thing that I need to use is the Speech SDK 5.1.  This SDK is all COM, btw, and has no managed interfaces. First off, what the heck is up with that?  Why are there no managed classes for working with speech “stuff” in Windows applications.  To me that's an indicator
    Filed under | 3 comments »