|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB.NET throws "Application is ambiguous" exceptionHello,
Could someone tell me how I can get around this issue, please? My application has to call a COM object that exposed 'Application' class. unfortunately, I also have a line of code "Application.Exit()" where in this instance, 'Application means the main application (system.forms namespace). But it is making the compiler to throw 'Application' is ambiguous, imported from the namesapces or types 'SomeCOM.ApplicationClass'. How can I differentiate the two? Thank you. Peter "Silver Oak" <Silver***@discussions.microsoft.com> wrote in message One set of groups has dotNet it their names and one doesn't ;-)news:2943B8A2-7410-473D-9CCF-859D8C516EE5@microsoft.com... > > How can I differentiate the two? Thank you. > Peter You'll want to post that question in a .Net group.They all contain "dotnet" or "vsnet" in their names. This and all other groups on the MS server that start with "microsoft.public.vb" are for VB Classic (mostly VB5/6) and were in existance long before any .Net products were released. While some of the code looks the same, they are very different products and require a different set of groups. Try one of these: news://news.microsoft.com/microsoft.public.dotnet.general news://news.microsoft.com/microsoft.public.dotnet.languages.vb news://news.microsoft.com/microsoft.public.dotnet.languages.vb.controls news://news.microsoft.com/microsoft.public.dotnet.framework.interop -- Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Show quote
Hide quote
"Silver Oak" <Silver***@discussions.microsoft.com> wrote in message System.Windows.Forms.Application.Exit()news:2943B8A2-7410-473D-9CCF-859D8C516EE5@microsoft.com... > Hello, > > Could someone tell me how I can get around this issue, please? My > application has to call a COM object that exposed 'Application' class. > unfortunately, I also have a line of code "Application.Exit()" where in > this > instance, 'Application means the main application (system.forms > namespace). > But it is making the compiler to throw 'Application' is ambiguous, > imported > from the namesapces or types 'SomeCOM.ApplicationClass'. > > How can I differentiate the two? Thank you. and/or NameOfMyComLibrary.Application.Exit remove the "imports NameOfMyComLibrary" (I think the keyword is imports for vb.net) Show quoteHide quote > > Peter Michael,
Thank you very much for your response. It works!! Peter Show quoteHide quote "Michael C" wrote: > "Silver Oak" <Silver***@discussions.microsoft.com> wrote in message > news:2943B8A2-7410-473D-9CCF-859D8C516EE5@microsoft.com... > > Hello, > > > > Could someone tell me how I can get around this issue, please? My > > application has to call a COM object that exposed 'Application' class. > > unfortunately, I also have a line of code "Application.Exit()" where in > > this > > instance, 'Application means the main application (system.forms > > namespace). > > But it is making the compiler to throw 'Application' is ambiguous, > > imported > > from the namesapces or types 'SomeCOM.ApplicationClass'. > > > > How can I differentiate the two? Thank you. > > System.Windows.Forms.Application.Exit() > > and/or > > NameOfMyComLibrary.Application.Exit > > remove the "imports NameOfMyComLibrary" (I think the keyword is imports for > vb.net) > > > > > > Peter > > >
AND Operator and Currency data type
FTP(not boring) Produktlokalisierung - wie funktioniert's? Consume Web Map Service (WMS) with VB6 "Save As" question & file extensions Obtain MCSE certificaiton without exams(Pay after check results)100% passing gaurantee list of files in directories? Refactoring add-in Syntax Error - Missing Operator - When Using Date ! Will a P&D packaged DLL (DLLSelfRegister) be registered correctly on all OS's? |
|||||||||||||||||||||||