Guest locutus Posted September 10, 2002 Posted September 10, 2002 Hi I have added a second form to my project in the .net studio but when I code a button on the main form with frmAccounts.show it is highlighted as an error with the message "this reference to a non shared member requires an object reference and none is supplied" what is this all about ? and how do I fix this ? , boy this .net is not as straight forward as other VB versions I have mucked about with , I am feeling kinda lost but will stick with it. Thx for any help. Locutus Quote
*Gurus* divil Posted September 10, 2002 *Gurus* Posted September 10, 2002 It doesn't let you get away with certain things you may have been used to getting away with in previous VB version, is all. One of these is implicitly creating an instance of a form with the same name as the form. In .net, you need to create an instance yourself, and pass it around to anything that needs it: Dim X As frmSecond = New frmSecond() X.Show() 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 Markdbd Posted September 18, 2002 Posted September 18, 2002 Thanks this helped me also :) Quote
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.