Too many arguments
Too many arguments
Too many arguments
Too many arguments
Too many arguments
Too many arguments Too many arguments Too many arguments Too many arguments Too many arguments Too many arguments Too many arguments Too many arguments
Too many arguments Too many arguments
Too many arguments
Go Back  Xtreme Visual Basic Talk > > > Too many arguments


Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2017, 05:44 PM
methc methc is offline
Newcomer
 
Join Date: Nov 2017
Posts: 1
Default Too many arguments


Hi guys! How are you all doing?

I'm new to this forum, just started working in VB .Net and I'm now starting my first project.

I ran into a little snag today, spent quiet a bit of time trying to fix it but you can't fix something if you don't understand what's going on, right?

So two things - can someone explain why I'm getting the error In the attached screen shot and how do I fix it?

Additional info:
Intellisense is suggesting that I generate a constructor sub in frm_reportviewer1 but when I do I get some more errors saying "reference to a non-shared member requires an object reference" (I get this when I say frm_reportviewer.show()

Any assistance is appreciated.

Thanks!

https://uploads.tapatalk-cdn.com/201...375fdfe735.jpg


Sent from my iPhone using Tapatalk
Reply With Quote
  #2  
Old 11-15-2017, 11:44 AM
passel's Avatar
passelToo many arguments passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,031
Default

It's hard to say without understanding some of the references in your code.
Assuming the frm_ReportViewer1 is a form in your project, the New method by default doesn't have any parameters, so if you wanted to create a new instance of the form it would be:

Dim FRM As New frm_ReportViewer1()

If you wanted to pass an object to the form so it could reference the object, then you would need to create another constructor that handled that passed object.
It sounds like that is what you did.

In which case, you would want to use the instance you created, not the class name.
So instead of

frm_ReportViewer1.Show()

you would use the instance created

FRM.Show()

Of course the instance named FRM would still have to exist, and the bit of code you show has it declared locally and used by calling FRM.ShowDialog(), so that should work.

I'm not sure where you are trying to do frm_reportviewer.show().
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
Reply

Tags
fix, reference, constructor, generate, intellisense, error, explain, attached, screen, frm_reportviewer1, info, additional, shot, suggesting, appreciated, assistance, tapatalk, iphone, frm_reportviewer.show, non-shared, errors, requires, object, .net, starting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Too many arguments
Too many arguments
Too many arguments Too many arguments
Too many arguments
Too many arguments
Too many arguments Too many arguments Too many arguments Too many arguments Too many arguments Too many arguments Too many arguments
Too many arguments
Too many arguments
 
Too many arguments
Too many arguments
 
-->