Follow me on Twitter at Twitter.com/wbm
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:http://morewally.com/cs/blogs/wallym/rss.aspx
Winform change between beta 1 and October CTP - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, Xamarin.iOS, Xamarin.Android, and Windows Azure.

News

Visual Studio Magazine Column Personal Blog

.NET

Book Authors

Business

Family

Friends

Georgia Tech Bloggers

Personal

Archives

Winform change between beta 1 and October CTP

FYI.  I just went back to a winforms application in beta 1.  It ran fine in beta 1, but when I opened it in the October CTP bits, I got a complaint from the MyApplication.vb file.

Here is what the file looked like in the beta1 bits.


Option Strict On
Option Explicit On


Namespace My
   
    Partial Class MyApplication
        Inherits System.Windows.Forms.WindowsFormsApplicationBase
       
        <Global.System.Diagnostics.DebuggerStepThrough()> Public Sub New()
            MyBase.New(System.Windows.Forms.AuthenticationMode.Windows)
            Me.IsSingleInstance = false
            Me.EnableVisualStyles = true
            Me.ShutDownStyle = System.Windows.Forms.ShutdownMode.AfterMainFormCloses
        End Sub
       
        <Global.System.Diagnostics.DebuggerStepThrough()> Protected Overrides Sub OnCreateMainForm()
            Me.MainForm = My.Forms.Form1
        End Sub
    End Class
End Namespace

With the october CTP bits, the file needs to look a little more like this:

Option Strict On
Option Explicit On


Namespace My
   
    Partial Class MyApplication

        <Global.System.Diagnostics.DebuggerStepThrough()> Public Sub New()
            MyBase.New(ApplicationServices.AuthenticationMode.Windows)
            Me.IsSingleInstance = False
            Me.EnableVisualStyles = True
            Me.ShutdownStyle = ApplicationServices.ShutdownMode.AfterMainFormCloses
        End Sub

        <Global.System.Diagnostics.DebuggerStepThrough()> Protected Overrides Sub OnCreateMainForm()
            Me.MainForm = My.Forms.Form1
        End Sub
    End Class
End Namespace

By making the changes, I was able to compile my application.  I hope this was helpful.  Obviously, I have no idea how well this will work against future versions.

Wally

Comments

Daniel Moth said:

On the face of it I only see the "Inherits" change. My guess is you will find another Partial Class MyApplication that has the inheritance declaration. [don't have Oct CTP to test for myself]
# November 25, 2004 5:41 PM