Welcome to AddressOf.com Sign in | Help

Twitpic Updates

Twitter Updates

Travel

Advertisment

 
Blog
  • Thank you...

    I'm honored to receive the Microsoft MVP award for being an "exceptional technical community leader who actively shares their high quality, real world expertise with others". Thank you to all of those whom have helped to make this possible; and thank you Microsoft for noticing.
  • Wow! I can't believe I found this code...

    Going through a bunch of old floppy disks and copying the files to my home server in an effort to get rid of these things, I happened across a bit of source code from WAAAAAAAAAY back.  (March 7th, 1990 to be precise.)

    For a few years around 1990, a friend of mine (Sean) and I ran a very successful BBS with tons of users and *AWESOME* interaction among them.  This was during a time in BBS usage was at it's height and there were probably thousands to choose from.  So Sean and I hatched a plan to put together our own online games and have these games be the driving force behind the entire community.

    So what kind of games would we create?  We were both into writing computer software and definitely considered ourselves computer enthusiasts.  So the plan was to create a few games (in the days of BBS world, referred to as a "door") that would allow people to hack various systems.  I had previous experience in such things and Sean had an amazingly creative imagination... we also decided to make it a challenge and build the doors in QuickBASIC 4.5 (as if creating games and learning the concept of interacting with BBS software via doors wasn't enough).

    The first game to be released was pretty simple, allowing you to gain access to a computer terminal running something very similar to MS-DOS.  You weren't sure what it was that you were looking for, you were just curious.  If you could unlock the secrets within, you'd win a prize. 

    HAKR 'R US was born (later to be renamed to Janitors 'R Us in honor of the main character in the games and for reasons of unwanted advances by the "men in black" -- a story for another day).

    Now that I've found this code, I'm hoping (most likely in vain) that I might be able to find part 1.  What I found instead was part 2... which as anyone knows would be a much more ambitious undertaking. ;-)

    So as I said, this code was written in QB4.5; of which there seems to be no way to execute it on Windows 7 64-bit (it's a 16-bit application).  So I could possibly setup a VPC image with DOS, find a copy of QB4.5 and try to get it running that way.  Nah... apparently I like challenges. ;-)

    Fast forward to today and we now have Microsoft Visual Studio 2010 and the version of BASIC is 14 revisions (Microsoft BASIC PDS 7.0/7.1, Microsoft Visual Basic 1-6, Microsoft Visual Basic for MS-DOS v1.00 and 5 releases on top of .NET) and 20+ years since this code was originally built.  What was I to do?  How about load it up in Visual Studio and see if I can get it to execute.  About 20 minutes later of creatively solving problems, the code was executing!  There were a few redraw problems with the key presses echoing twice to the screen (this was by design since we were emulating DOS through a terminal process which meant that you'd press a key and in order to see it on the screen, we'd have to send that string back to the client.)  Wiped out the code causing this, the code that tracked prior usage and current progress for each user... the game was now playable.

    Ah... the memories.

    A few observations:

    • It's interesting to note that, for the most part, the BASIC language, at it's core, has been a strong language throughout all these years.  The most basic constructs have managed to stand the test of time throughout all of these years.  Most of the items that I had to change had to do with the "platform" (MS-DOS), specifically with how you interact with the console screen.
    • The code that I wrote 20 years ago is SCARY!!! ;-)
    • Even though the code was "sub-par" by today's standards, it did work; and it worked very well.
    • It's even more SCARY that it's been 20 years!!!

    I think I'm going to translate the code to Silverlight and make it available for playing; this would require that I build some sort of emulated console display (which I think would be pretty straight forward).  I may even do what I did in the past; offer a prize to those that can unlock the secrets within.  So brush up on your MS-DOS skills. ;-)

    05-26-2010, 7:09 PM by CorySmith to AddressOf.com
  • Speaking tonight at the Shreveport .NET User Group

    Shortly after lunch today, I'll be headed to the Shreveport .NET User Group to lead a discussion on the topic of Windows Forms, WPF and Silverlight.  If you're in the area, be sure to stop by and say hello. 

    Topic: Windows Forms vs WPF/Silverlight: A Candid Conversation

    Summary: What is the future of Windows Forms? If I stay with Windows Forms, am I SOL? Why should I move to WPF/Silverlight? Should I choose WPF or Silverlight? What tools are available for working with these new technologies? What are third-party component vendors providing that can help me? These are the questions that aren't answered when we see the glitz and glamour of technology demos regarding WPF/Silverlight; so these are the questions that we'll tackle head on.

    Next month you can watch me present on "What's New In Visual Studio 2010" at the Fort Worth .NET Users Group!

    05-25-2010, 9:06 AM by CorySmith to AddressOf.com
    Filed under:
  • Speaking tonight at Dallas .NET Users Group!

    Putting the finishing touches on my demo code for tonights presentation at the Dallas .NET Users Group... if you're going to be there for the VS 2010 launch, be sure to stop by and say hello.  I'm presenting on What's New in Visual Basic 2010.
    05-13-2010, 3:32 PM by CorySmith to AddressOf.com
    Filed under:
  • Back...

    After several months of not being able to use this site (thanks to my host provider "improving" my service).

    Now that Visual Studio 2010 has been released, I have tons of things to talk about and will have several demo projects released very soon.  If you have any questions regarding anything having to do with Visual Basic in Visual Studio 2010; please feel free to contact me and I'll add them to the list.

    05-13-2010, 3:29 PM by CorySmith to AddressOf.com
  • Touring through Northwest Arkansas

    I'll be leaving either tonight or tomorrow morning (really early) to start heading to Fort Smith, AR. Tuesday evening will be in Springdale, AR and finishing up Thursday evening in Harrison, AR.

    If you are in the area of *all* three user group, consider attending all three since each group will host a different topic.

    LINQ - An Average Joe's Guide (or "It's not all about SQL")
    Fort Smith .NET User Group (Fort Smith, AR)
    September 14th, 2009 - 6:00pm

    ClickOnce - The Good, The Bad and The Ugly
    Northwest Arkansas .NET User Group (Springdale, AR)
    September 15th, 2009 - 5:30pm

    Comparing WinForms to WPF
    Ozark .NET User Group (Harrison, AR)
    September 17th, 2009 - 6:00pm

    As always, look forward to a heathly dose of conversation (not presentation). 

    It's looking like it will be raining all the way through Wednesday. :-(  Bad for motorcycling, but might be good for you.  If you are in the area and would like to get together, contact me and we'll see what we can do. 

  • WinForms ComboBox -> DevExpress ComboBoxEdit (migration)

    I found a couple of solutions on the DevExpress website for how to use the ComboBoxEdit component the way I wanted, however, none of them seemed to provide a smooth transition from the WinForms databound ComboBox to the DevExpress counterpart.  So using some fo the examples that I found, reading through the help and reflecting on the subject for a whole five minutes... here is what I ended up with.

    Option Explicit On

    Option Strict On

    Option Infer On

     

    Imports System.ComponentModel

     

    <ProvideProperty("DisplayMember", GetType(Control))> _

    <ProvideProperty("ValueMember", GetType(Control))> _

    <ProvideProperty("DataSource", GetType(Control))> _

    Public Class ComboBoxEditEx

      Inherits DevExpress.XtraEditors.ComboBoxEdit

     

      Private m_valueMember As String

      Private m_displayMember As String

     

      <Category("Data")> _

      <Description("Indicate the property to display for the items in this control.")> _

      Public Property DisplayMember() As String

        Get

          Return m_displayMember

        End Get

        Set(ByVal value As String)

          m_displayMember = value

        End Set

      End Property

     

      <Category("Data")> _

      <Description("Indicates the property to use as the actual value for the items in the control.")> _

      Public Property ValueMember() As String

        Get

          Return m_valueMember

        End Get

        Set(ByVal value As String)

          m_valueMember = value

        End Set

      End Property

     

      <Category("Data")> _

      <Description("Indicates the list that this control will use to get its items.")> _

      Public WriteOnly Property DataSource() As DataTable

        Set(ByVal value As DataTable)

          Dim item As New ComboItem(Me.ValueMember, Me.DisplayMember)

          item.SetDataSource(Me, value)

        End Set

      End Property

     

      <Browsable(False)> _

      Public Property SelectedValue() As Object

        Get

          Dim item As New ComboItem(ValueMember, DisplayMember)

          Return item.GetItemValue(Me)

        End Get

        Set(ByVal value As Object)

          Dim item As New ComboItem(Me.ValueMember, Me.DisplayMember)

          item.SelectItem(Me, value)

        End Set

      End Property

     

      <Browsable(False)> _

      Public ReadOnly Property Items() As DevExpress.XtraEditors.Controls.ComboBoxItemCollection

        Get

          Return Me.Properties.Items

        End Get

      End Property

     

    End Class

     

    Friend Class ComboItem

     

      Private m_value As Object

      Private m_displayText As String

     

      Friend Sub New(ByVal valueMember As Object, ByVal displayMember As String)

        m_value = valueMember

        m_displayText = displayMember

      End Sub

     

      Public Overrides Function ToString() As String

        Return m_displayText

      End Function

     

      Friend ReadOnly Property Value() As Object

        Get

          Return m_value

        End Get

      End Property

     

      Friend Sub SetDataSource(ByRef control As ComboBoxEditEx, ByVal dt As DataTable)

     

        For Each row As DataRow In dt.Rows

          Dim item As ComboItem = New ComboItem(row.Item(control.ValueMember), CStr(row.Item(control.DisplayMember)))

          control.Properties.Items.Add(item)

        Next

     

      End Sub

     

      Friend Function GetItemValue(ByRef control As ComboBoxEditEx) As Object

        Dim item As ComboItem = TryCast(control.SelectedItem, ComboItem)

        If item Is Nothing Then

          Return Nothing

        Else

          Return item.Value

        End If

      End Function

     

      Friend Sub SelectItem(ByRef control As ComboBoxEditEx, ByVal value As Object)

     

        Dim index As Integer = 0

     

        For Each obj As Object In control.Properties.Items

          Dim item As ComboItem = TryCast(obj, ComboItem)

          If item IsNot Nothing AndAlso _

             item.Value.Equals(value) Then

            Exit For

          Else

            index += 1

          End If

        Next

     

        If index >= control.Properties.Items.Count Then

          control.SelectedIndex = -1

        Else

          control.SelectedIndex = index

        End If

     

      End Sub

     

    End Class

    The overall goal was to provide a seemless transition (read: drop in replacement) for the comboboxes I already had on existing forms to migrate to use all devexpress controls since I wanted to take advantage of the skinning tech in XtraForm.  So what I needed was an easy way to take the existing datatables I had bound to WinForms ComboBox's, the code already used to assign (SelectedValue and SelectedIndex depending on circumstances).  So far this has worked out pretty nicely.  If you are in the same situation... here you go...

    07-29-2009, 6:46 AM by CorySmith to AddressOf.com
  • The *new* Star Trek

    Before seeing the movie, back when information regarding some of the story elements starting coming out, I was extremely concerned regarding the inclusion of yet another "temporal anomaly" being used to spark the story line.  It's not that Star Trek hasn't had time travel elements in there from the beginning, it's just that this usually ends up as a crux because they seem to haven't been able to figure out something better to do so "hey, let's do another time travel episode".  Anyway, after seeing the movie, this was pure genius in this case because it helped to spark real separation between the old and the new.  All of the characters have their basic personalities in place; however, because of the way the overall story was put together, everything can evolve in a much different direction.  I don't want to give anything away, but if you haven't been interested in seeing the "new" Star Trek because of any thoughts regarding departure from the "old"; do yourself a favor and go watch the movie.  This is, by far, one of the best Star Trek movies... I'd be willing to say that it is *the best* Star Trek movie because they are able to gather a group of young actors and prep them to "boldly going where no one has gone before" for many years to come.  I very much look forward to the next Star Trek movie!

    05-14-2009, 9:08 AM by CorySmith to AddressOf.com
  • San Diego ASP.NET SIG - May 19th, 6pm

    I'll be at the San Diego ASP.NET SIG on May 19th doing my LINQ in the Real World discussion.  For anyone that has been at my previous "presentations", you'll know that I prefer to have more of a discussion surrounding the topic than a lecture.  So if you're in the area and would like to help spark conversation, feel free to attend.  As for the "presentation", the topic is LINQ in the Real World where I'll be discussing how to leverage LINQ to solve every day programming problems with an overall goal of improving "flow" of the code that will also assist in the long term maintenance.  Hope to see you there!
    05-14-2009, 8:43 AM by CorySmith to AddressOf.com
  • Looking for suggestions...

    What would you like me to write about?  Send me a message via any of the contact information (look to the left; if reading this in a aggregator, visit the site ;-))

     Yeah, I know, I should have comments turned on; however, comment spammers are vicious and adding road blocks to comments just seems wrong.

    Anyway, if you have something you'd like me to talk about, shoot me a message and I'll take it under consideration.

    05-01-2009, 1:06 PM by CorySmith to AddressOf.com
  • INETA

    Oh yeah, by the way, I'm now an INETA speaker. ;-)

    What does this really mean?  Well, if you'd like to get me to come out to your user group, all you need to do is put in a request to www.INETA.org and they'll help with the travel/hotel expenses and even pay for the pizza!  So here's a chance that you and I can meet face to face, no matter where you live. :-D

    For the record, I'm not a "big shot" "important" "super smart" "graduated at the top of my class" kind of guy; I'm just a regular guy who likes computers and code (preference with VB).  So if you're looking for a "lecture", I'm not that guy.  If you're looking for someone to spark conversation; that might be me.

    Anyway, just wanted to share that there is an opportunity for you to "use and somewhat abuse" my willingness to visit and hang out with your user group; wherever that may be.  And, of course, give a HUGE thank you to the folks that operate www.INETA.org (and all of their sponsors).

    Feel free to contact me if you'd like to discuss this further.

    04-20-2009, 7:30 AM by CorySmith to AddressOf.com
  • Open Letter to the ClickOnce team.

    I really like using ClickOnce; however, there are a couple of annoyances that I'd wish would get resolved.

    1. Can we please get a "sync versions" checkbox somewhere?  Meaning, why do I have to change my version number in three different places?  I'm sure there are cases where this is desirable; however, I don't believe that it is the norm.  So here's my suggestion:  On the Assembly Information dialog, next to the Assembly version and File version entries add a "Automatically Syncronize with ClickOnce publish version" type checkbox.

    2. Can we please... pretty please... just get a checkbox that says "Always require latest version." in the Application Updates dialog?  I like having the "Specify a minimum required version for this application" ability; however, I would like to ALWAYS require this.  As it is now, I have to change the Publish Version, click on the Updates button and change the version there as well.

    I have other annoyances; however, I believe that the impact of getting them finished in time for VS2010 would be too much; so I'll leave it with these.  I don't think these would be major changes and wouldn't require a huge amount of testing to get implemented.

    Thanks for your consideration.

    Cory Smith

    04-17-2009, 6:23 AM by CorySmith to AddressOf.com
  • Microsoft MVP Summit 2009

    I decided that I would be adventurous this time around going to the summit.  This time around it's just me, my motorcycle, whatever technology I can carry and over 5000 miles of roadway.  I've never been on this long of a a trip and have never done this sort of trip without others (noone else I know, it seems, is insane enough to attempt this sort of trip in the time frame I'm attempting to do it). 

    In addition to going to the summit, I'm headed down to L.A. and Las Vegas to meet up with some martial arts friends for a bit of training...

    Everything is packed.  Getting ready to catch some sleep and getting up in the morning to get on the road at around 5am.  I'll be twittering, twitpic'ing and blogging when I can; so feel free to virtually follow along.

    To all of those going to the MVP Summit... look for me in the the Westin lobby every evening. ;-)

    02-25-2009, 12:18 PM by CorySmith to AddressOf.com
  • Expired ClickOnce Certificate

    January 7th, 2007 - Got bit by the expired temporary certificate issue when trying to deploy a ClickOnce application.  Never got a "real" certificate since it wasn't necessary for the needs of this particular application.  You can't just replace the certificate because that would require that every basically uninstall the old version and visit your deployment location to reinstall.  So the only solution at the moment was to change the date on your deployment computer and publish accordingly (it seems the expired certificate only relates to using it to deploy; not the actual installation).  After talking with several people at Microsoft, a "fix" was on the way in the form of the RenewCert.exe sample project.  This small console application can be run against and existing temporary certificate and extend the date of it by five years from the date that you run it.  Problem solved.

    January 6th, 2008 - Visual Studio 2008 was available and the project(s) that were built by someone else were being combined into a single executable.  Since this was the case and it was also a case of a new .NET Framework being used, requiring a new install wasn't an issue (even though the certificate in question was already taken care of).  I decided to go ahead and give this "issue" another chance since there was also a revamped ClickOnce with the new framework.

    January 6th, 2009 - @#%@#$$@#%%@ Same issue.  Oh well, time to find that RenewCert.exe and run it.  Doh... some Side-By-Side issue.  Had to rebuild the C++ console application to get it to work.  Renewed the certificate and now things are moving forward again.

    I'm sure there is some lesson to be learned here; however, the point was that I was able to get back on track.

    Now, apparently Microsoft has come to their senses with .NET 3.5 SP1 and modified the ClickOnce deployment to allow people to not have to sign their deployment manifests.  I just tested a project deployed with signing, then extended it using RenewCert.exe with .NET 3.5 SP1.  Works great.  Then I took the next step of unchecking the sign ClickOnce manifests to see if the project would still install without any issues (meaning not wanting to cause issues with end users) and other than the warning you get when deploying regarding that you are changing the certificate (not changing, removing... hmmmm), the upgrade worked without any issue.

    I also ran this using the .NET 3.5 as a prereq in the deployment; however, the test machine now had .NET 3.5 SP1 installed, so not sure if it was a valid test.

    Either way, having the option to not have to sign is a nice feature; especially if you are in an intranet environment.  However, I'm not sure that I want to open this completely up on a server that is out in the wild; though it's probably not a huge deal considering the many factors that could go into the deployment, target audience, server security, etc. involved.  Since I have a solution that can extend the certificate, I suppose I can ponder this on another day...

    For a slightly modified version of the Microsoft solution, go here. NOTE: I strongly recommend downloading and reviewing the source; build from that.  Don't trust exe's from an unknown source... not saying anything negative specifically about this source, just as a habit... don't do it.  If you know the person, then at least you know who you can track down accordingly.  Although I don't know him, I want to thank Cliff Stanford for providing this as a project solution.

    NOTE: This post is more for me as a reminder for when I use ClickOnce for the next project. If it gives you some food for thought, excellent!  ;-)

    UPDATE: Of course all this worked with a test project/deployment.  When I had to do this on a REAL project, things didn't go so smoothly.  Final result was to reverse everything I had done and set my date back to December 1, 2008 to get it to publish.  Still investigating what is going on here; one major difference is that I also have all of the related assemblies strongly signed.  I have no idea if that is an issue or not; however, the error I was getting was found on a couple of websites as something similar (but no mention of expired certificates) and, wouldn't you know, no one had replied with any sort of suggestions or possible solutions.  When I get a moment, I'll dig into this deeper and provide another update.

    UPDATE/SOLUTION: I had to get the original Microsoft solution working in VS2008 (the source shown on the site didn't want to compile in the latest version, was originally for VS2005).  I so love how C++ seems to CHANGE every single version and not work with prior versions.  I suppose if I was a C++ expert, this would be old hat; however, I only use it out when necessary so count me as a newb. ;-)  Anyway, once I got it to build (and this time I built it in RELEASE mode so that the .exe would work side-by-side in newer versions of .NET) it modified the certificate and everything worked smoothly after that.  If you need the updated source, let me know and I'll be glad to make it available.

    01-13-2009, 9:14 AM by CorySmith to AddressOf.com
  • Fort Worth .NET Users Group - January 20th

    If you're in the area, don't miss my presentation: What's New in .NET 3.5 Service Pack 1.

    Additionally, I've decided to extend Microsoft's extreme generosity by giving away a copy of MSDN Premium **WITH** Microsoft Visual Studio Team System 2008 Team Suite!!!!!!  Yes, you read that correctly!  It's the edition that lists for $10,939!!!!!!!

    I'm not giving away the actual packaged product, but what I'm giving away is a card that contains an activation number so you can activate your 1 year subscription.  All you have to do is show up, participate in the meeting... oh yeah, and you ***MUST*** RSVP, following the instructions on the Fort Worth .NET Users Group site!!!!

    Even if you don't win, it is my hope that your intention was to see my presentation. ;-)

    01-03-2009, 1:12 PM by CorySmith to AddressOf.com


AddressOf.com
About AddressOf.com
AddressOf.com is the place for the Visual Basic developer. All topics at all levels are touched upon here. One of the main goals of AddressOf.com and its members is to promote Visual Basic as the tool for choice for all developers; yet understands that sometimes other tools better suited to specific tasks and, as such, have an open acceptance to all products that allow us, the developer, to get the job done in a timely and efficient manner.

Who is Online

There are 8 guest(s) online. Currently there are no online users.

My Xbox Friends