Disable “default instance” in VB 2010

后端 未结 1 1690
日久生厌
日久生厌 2021-01-24 23:18

I\'ve started doing some basic win forms work in VB 2010 and I\'m really bothered by the default instance feature. Is there a way I can disable it entirely and just use the cla

相关标签:
1条回答
  • 2021-01-24 23:50

    Add a parameter to the form's constructor. That will prevent the default instance being created. You will need to have a call to InitializeComponent to layout the controls.

    Sub New(junk As Object)
        ' This call is required by the designer.
        InitializeComponent()
    
        ' Add any initialization after the InitializeComponent() call.
    
    End Sub
    
    0 讨论(0)
提交回复
热议问题