Form1 is not a member of windowsapplication1




















No changes to your code are going to fix that problem. More likely, you have been through several iterations in the designer and it got confused, or you managed to confuse it by deletions, renaming etc. Whatever, you cannot make changes to code in the designer and expect things to come together properly - it might look OK but there are inconsistencies behind the scenes that will cause the type of problem you are seeing.

The 'fix' you did simply created a new data grid view so your code compiled without error. But that doesn't mean the code will work - as you have discovered. This is what the designer code looks like immediately after you drag the first DGV onto a new form.

That's what you should get back to - most importantly, you should not have any additional code in the designer or the main form that declares the DGV, whatever the name. You need to work out what the name for that control needs to be, and then ensure that it is used absolutely consistently right throughout your code - including the code that is generated automatically for you.

The content you requested has been removed. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums V. Visual Basic Language. Not for VB6 2 2. Sign in to vote.

All form controls programmatically work fine except one; DataGirdView. Top Rated Most Recent. Accept Solution Reject Solution. May be the possibility that 1. There are two. Please confirm the same and delete the old aspx page from server. Try after renaming the name of the. Posted Oct am AshishChaudha. Member May am. Copy Code. AshishChaudha Oct am. Then is your problem solved?? When this method is called, an override of popup is called which initialises and also takes the error message as a parameter.

Despite this, the event handler for clicking the button is playing up. The VB code for my popup class is almost exactly the same:. On double-clicking the error in the error list it takes me to popup. How can I fix this? I actually have several buttons on my main page which work perfectly using visual basic!

This one button, for some reason, does not. Is there something different I need to do because it is on a separate window as part of a popup? The error is highlighted in the popup. Choose the form you want as the startup form from the Startup Object drop-down list. Under the tab, Application. Form1 Change to: Me. YourMother YourMother 31 1 1 bronze badge. Form1 End Sub Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science.



0コメント

  • 1000 / 1000