Access Form Property with Instance VB.net

后端 未结 1 1648
你的背包
你的背包 2021-01-24 05:24

In Windows Forms (Vb.net) how can I access the properties without instance (new) ?

Form1.Property = \"\" ??? the property deceleration is not static? what is called thi

1条回答
  •  醉梦人生
    2021-01-24 05:59

    VB.Net does some magic to allow you to pretend that forms don't have instances.

    It creates a hidden shared instance, and converts static calls to instance methods (eg, Form1.Show()) into instance calls on this shared instance.

    This is done for VB6 compatibility and should be avoided.

    0 讨论(0)
提交回复
热议问题