Guest afrinspray Posted July 26, 2002 Posted July 26, 2002 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"? Quote
*Gurus* Derek Stone Posted July 26, 2002 *Gurus* Posted July 26, 2002 They had no choice but to remove them. .NET doesn't support them. Simple as that. And yes, if you have the time to make the proper changes I would remove the DefInstance functions, although they shouldn't cause any problems as they stand. Quote Posting Guidelines
*Gurus* divil Posted July 28, 2002 *Gurus* Posted July 28, 2002 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. Quote 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 July 30, 2002 Posted July 30, 2002 Is it then also bad practice to use global variables in Modules? Quote
*Gurus* Derek Stone Posted July 30, 2002 *Gurus* Posted July 30, 2002 (edited) There are no modules in .NET. (see below) Edited July 30, 2002 by Derek Stone Quote Posting Guidelines
Guest afrinspray Posted July 30, 2002 Posted July 30, 2002 Yes there are modules in .NET. I'm using some right now!? Quote
*Gurus* Derek Stone Posted July 30, 2002 *Gurus* Posted July 30, 2002 I stand corrected. My apologies. And yes, it is a bad practice if you want to adhere to strict OOP standards. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.