Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / August 2003

Tip: Looking for answers? Try searching our database.

ActiveX control disappears from Windows form in VS.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Severino - 27 Aug 2003 23:42 GMT
Hello,

I've developed a MFC based ActiveX control using VC++ 6.
In the last days I've tested the control compatibility with the various
language of Visual Studio.NET and it seemed to work correctly.
Today I was forced to change the control version stored inside the .odl file
from 7.3 to 7.4 and with big surprise, if I now open the VS.NET projects the
control is disappeared from the Window form in which it was created (and
obviously compiling the project I get errors that say that the type of
control is not defined).
If I now close the VS.NET project, put back the control version to 7.3
inside the .odl file, recompile the ActiveX control and reopen the VS.NET
project, the ActiveX control appears on the form as espected.

The line changed inside the .odl file was similar to the line below

[ uuid(xxxxxxxx-xxxx-11d2-8183-000xxxxxxFD8), version(7.3),

and was simply changed to

[ uuid(xxxxxxxx-xxxx-11d2-8183-000xxxxxxFD8), version(7.4),

Why VS.NET projects cannot accept this version change when an ActiveX
control changes its version?
This is causing me a big panic because this means that projects developed
could stop working for a simple change of version of an ActiveX control.

What must be do to avoid this problem?

Thanks in advance and Kind Regards

Severino
Severino - 28 Aug 2003 08:34 GMT
As a further information about this problem, I noticed that the problem can
be manually solved (not surely the ideal solution) changing the following
lines inside the VB.NET project (the file with extension .vbproj)
I searched inside this file the Reference to my ActiveX control and found
the following section referencing my control

<Reference
    Name = "AxMyControl"
    Guid = "{xxxxxxxx-xxxx-11d2-8183-000xxxxxxFD8}"
    VersionMajor = "7"
    VersionMinor = "3"
    Lcid = "0"
    WrapperTool = "aximp"
/>

I manually changed the VersionMinor field to 4 and saved the project;
reopening the project with VS.NET my ActiveX controls are again visible over
the form and the compilation goes through without problems.
Can this be considered a weird bug inside VS.NET or there is some kind of
turnaround for this?

Thanks in advance and Kind Regards

Severino

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.