Jump to content
Xtreme .Net Talk

DefInstance


Recommended Posts

Guest afrinspray
Posted
Do you guys think it's good practice to remove the DefInstance functions in an upgraded VB net program? Why did Microsoft remove the ability to access "default forms"?
  • *Gurus*
Posted

Microsoft didn't remove the ability per se, you just have to understand that in VB.NET you have Classes, and you have Structures. There is no special case for forms as there was previously. A "form" is just a class with some pre-written code.

 

You can't just get a default instance of a class, that's what Shared members are for. I hope that makes it clearer.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Guest afrinspray
Posted
Is it then also bad practice to use global variables in Modules?
Guest afrinspray
Posted
Yes there are modules in .NET. I'm using some right now!?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...