Visual Studio – first impression

I've been moving around in Visual Studio for the last hour, trying to get familiar with it.  As always, I feel that the best way to learn to use a program is to start with a project, so I decided to re-write my templates add-in for Excel 2007.  In truth, I would prefer to re-write my Favourites add-in, but it will be more difficult, so I'm using the templates one as a learning ground. 🙂

So here are my first impressions of Visual Studio 2005 from the point of view of someone who is pretty comfortable in the Excel VBE:

  • Overwhelming
  • Powerful
  • Exciting

That is exactly the order that my feelings went, with about 20 minutes between each...

There are so many commands in here, that it's hard to figure out what I'm trying to do.  It took me 10 minutes to figure out how to change the name of my project (right click on it and say "rename"... don't I feel like an idiot now!)   I may have complicated things though, as I installed MZ Tools immediately, just because I didn't have enough tools to get lost in right away.  😉

To further complicate things, (as if the new UI wasn't enough to deal with,) the code is all VB.Net.  This means that I'm going to have to convert some of my code (how much remains to be seen) to VB.Net from VBA.  The first example I came across was a Property statement.  In VBA, we'd have a Property Let and Property Get routine.  In VB.Net though, it's all in one routine:

[vb]    Public Property EditMode() As Boolean
'Author       : Ken Puls
'Macro Purpose: Holds value for edit mode

'Return the value of edit mode
Get
EditMode = bEditMode
End Get

'Set the value of edit mode
Set(ByVal value As Boolean)
bEditMode = value
End Set
End Property[/vb]

Now I haven't even got to the point where I can attempt to debug this yet, so it could be totally wrong, but it does look like the help file example.  ;)  If it is right, I actually like this better.  It  sure makes it easier to keep straight, and keeps the code collected better.

Now, back to the Visual Studio IDE... here's some of the things that strike me as really cool:

  • You can collapse blocks of code.  In the example above, I can collapse the Get portion, the Set portion, the comment portion, or the whole routine.  Very cool!
  • Adding code to deal with the Ribbon is as easy as choosing Project|Add Module|Ribbon support.  (Actually, this is a VSTO template, not strictly VS alone.)  As soon as you do, *poof!*, you have a module set up with the code to create a sample ribbonUI.  In fact, the RibbonX code is in another module, so you can edit it there.  All the info in one place, rather than flipping back and forth between Excel and the CustomUI editor.
  • An error list at the bottom of the screen highlights all the errors in your code.  (I have a ton right now!)  This is how I knew that my Property routines were at issue.
  • The help files seem to have a lot of information and it's actually helpful.  That may sound a little cheeky, but I always found the help files in Excel 2002 and prior quite frustrating.  2003 was okay, but 2007 seems better from what I've seen.  I may change my opinion on this, but the Property help page was quite easy to use.

At any rate, that's about as far as I've got with it so far, but I like what I see.  I do understand why Microsoft is pushing developers to use this product, but I still feel that they should give the tools to those developing within Excel from start to finish.  The reason I'm in this program at all is because the only hope I have of populating a RibbonX group on the fly is by writing a COM add-in, and that shouldn't be the case.

Just my 2 cents on the matter.  😉

6 thoughts on “Visual Studio – first impression

  1. Hi Ken,
    I find your blog very interesting, it really helped me to master RibbonX. We have designed a fairly complex Word COMAddin written in VB6. To be honest, we don't envision moving to VS2005, it would request a major development effort not even counting all the side code to automatically deploy the package. We started to write some RibbonX code and so far we are facing the following problems:
    - Not all the commands are repurposable. For instance Undo is not repurposable
    - No way to Invalidate a specific Mso control or Tab. You must invalidate everything
    - No way to “select” a specific Tab
    - Very difficult to set a PNG image button. We found some code on the .Net. Without this piece, it would be impossible to set transparent buttons! However I still did not find the way to set an image while in debug mode (in the old mode, copy/paste face are used)
    - It shortcuts are still needed (I don’t find keytips handy), the only way to set it is still to use an Addin that will hold shortcuts

  2. Hi Nicolas,

    Thanks for the comment, and I'm glad that you've found the blog useful. 🙂

    On the Invalidate portion, I was under the impression that you could invalidate a specific control by Invalidate("ControlID"). I don't have Office 2007 where I am to test that though.

    I agree that RibbonX has some shortcomings, but hope to see some of them addressed in future versions of the product. I aslo believe that as more people start working with RibbonX, we'll start seeing workarounds and tricks surface. I've actually seen a couple already, and I'd bet that many more will surface. 🙂

  3. Ken,
    You can Invalidate your controls individually, however there is no mechanism to invalidate Mso controls individually.

  4. Hi chaps

    Ken,
    Get stuck in to VS, it's a dam cool bit of kit! Some of the controls are amazing. I actually hate the new help system, but there you go, I guess my help file, begins with http://www.google.com!

    Nicolas
    As for the png issues be sure to check out Stevens site, i was some info over there about this issue the other day, and you can be sure that if it's anything to do with Steven it will be of the highest quality!

  5. Ken,
    "Ah, I think I see what you're getting at. You're trying to repurpose a built-in control?"
    Indeed

    Thanks Ross, I did get his piece of software which is of top quality and it really saves us!

    I
    Nicolas

If you have a comment or question about the blog post content, please feel free to post it here. If you need help adapting this solution to your own needs, please post in our free help forum.

Your email address will not be published. Required fields are marked *