Taking Control of My VB2005 Application
I was doing some tinkering tonight. I created a new WinForms app, but instead of just having a start up form, like usual, I wanted to take control of it and do it old school.
Now, in the Old Days(TM)1, all you did was somewhere in your code add yourself a Public Shared Sub Main(). Then in the project properties, you selected your start up object from a list of all forms and Sub Mains in your project.
And what do we do in the New Days(TM)2? I'd really like to know. I can't figure it out. I can choose any of my forms to be a start up form, but no Sub Main to be seen in the list. I've waded through all the designer generated code, all the hidden My generated code, and can see nothing. I've loaded a compiled app into Reflector, and found what looks to be a compiler generated Sub Main that invokes whatever the chosen start up form is, but I can't find any way to elect to write my own Sub Main.
I'm mostly happy with all the changes that have happened with VS2005. But once in a while I really have to ask myself what the hell they were thinking when they designed certain 'features'. This is one of them. VB was supposed to be the place you could do anything you wanted, easily. But My, so far, has made things harder. The changes to web projects that they did (project-less? you're kidding me right?) I still think are a mistake. The amount of really obvious bugs that have slipped through is extremely disappointing. And now I have to slam myself up against this problem.
Anyone know a way around it? While I'm at it, anyone know how to disable My? (Without changing language, that is :) The rate this is going, I'm actually almost pissed off enough to change languages anyway. There's making things easy, and then there's making things dumb. I'm think they've taken it too far.
1 - VB7.1 - Visual Studio 2003.
2 - VB8 - Visual Studio 2005.