473,396 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changes in OCX do miss instances in my application

Hello All.

I have one OCX made in VB6 that is used in my VB.Net application (Interops).
Recently, I did some changes in the OCX (adding one event) and, when I load
my application again, I've noted that all my OCX instances disappeared from
forms.

I've noted that same thing occur when I change a pure .Net UserControl.

Have some manner to avoid this problem?

Tks in advance!

Cesar
Nov 20 '05 #1
6 1903
"Cesar Ronchese" <ro******@smlinfo.com.br> schrieb

I have one OCX made in VB6 that is used in my VB.Net application
(Interops). Recently, I did some changes in the OCX (adding one
event) and, when I load my application again, I've noted that all my
OCX instances disappeared from forms.

I've noted that same thing occur when I change a pure .Net
UserControl.

Have some manner to avoid this problem?


At least you have to enable binary compatibility. Despite, if you add an
event, you create a new version of the type library (from 1.0 to 1.1)
because you changed the public interface. Due to this change, the "Identity"
of the reference changes and the library isn't found anymore.

I watched this when I just tried it, but I'm afraid, I don't have a solution
for you.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
I already use binary compatibility to my COM component, and the .NET
UserControl I always have compiled with 1.0.0.1 version.

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40*********************@news.freenet.de...
"Cesar Ronchese" <ro******@smlinfo.com.br> schrieb

I have one OCX made in VB6 that is used in my VB.Net application
(Interops). Recently, I did some changes in the OCX (adding one
event) and, when I load my application again, I've noted that all my
OCX instances disappeared from forms.

I've noted that same thing occur when I change a pure .Net
UserControl.

Have some manner to avoid this problem?
At least you have to enable binary compatibility. Despite, if you add an
event, you create a new version of the type library (from 1.0 to 1.1)
because you changed the public interface. Due to this change, the

"Identity" of the reference changes and the library isn't found anymore.

I watched this when I just tried it, but I'm afraid, I don't have a solution for you.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
I think you need to rebuild the Interops before loading the application into VS.NET. These will be in the bin folder

tlbimp "myControl.ocx" /out:Interop.myControl.dll /namespace:myContro
aximp "myControl.ocx" /out:AxInterop.myControl.dll /rcw:Interop.myControl.dl

Hope this helps.
Nov 20 '05 #4
"Chris Podmore" <an*******@discussions.microsoft.com> schrieb
I think you need to rebuild the Interops before loading the
application into VS.NET. These will be in the bin folder.

tlbimp "myControl.ocx" /out:Interop.myControl.dll
/namespace:myControl
aximp "myControl.ocx"
/out:AxInterop.myControl.dll /rcw:Interop.myControl.dll

Right, but what I didn't know was what can be done to avoid this.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
Hello.

I've tryied compile using the tlbimp, but when I try add reference the
UserControl to Components, the message saying "there are no UserControls in
this reference" appear.

"Chris Podmore" <an*******@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
I think you need to rebuild the Interops before loading the application into VS.NET. These will be in the bin folder.
tlbimp "myControl.ocx" /out:Interop.myControl.dll /namespace:myControl
aximp "myControl.ocx" /out:AxInterop.myControl.dll /rcw:Interop.myControl.dll
Hope this helps.

Nov 20 '05 #6
When you say you add a reference to the UserControl to Components do you mean the toolbox? If so then you must add the user actual user control (OCX) to the toolbox. tlbimp and aximp will only recreate the Interpos for you

I don't think there is anyway to avoid recreating the interops if the ocx changes, compatibility or new events added

----- Ronchese wrote: ----

Hello

I've tryied compile using the tlbimp, but when I try add reference th
UserControl to Components, the message saying "there are no UserControls i
this reference" appear

"Chris Podmore" <an*******@discussions.microsoft.com> wrote in messag
news:93**********************************@microsof t.com..
I think you need to rebuild the Interops before loading the applicatio

into VS.NET. These will be in the bin folder
tlbimp "myControl.ocx" /out:Interop.myControl.dll /namespace:myContro

aximp "myControl.ocx" /out:AxInterop.myControl.dl

/rcw:Interop.myControl.dl
Hope this helps


Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Angelos Karantzalis | last post by:
Hi y'all ... I'm a bit puzzled here about .NET class instancing under COM+ Issue 1: I've a COM+ component, let's call it ... COMDbWrapper that initializes itself from an xml file. The data...
8
by: perspicacious | last post by:
Please visit http://epaperpress.com/temp/t.html and click on the link. The link source indicates the filename is unix.tar.gz however, when downloading in ie6, it changes the name to ...
1
by: Ronj | last post by:
I need to be compliant with law that keeps a history of changes to tables as records are edited. What is the best way to do this ? I was thinking a SQL trigger on each table that writes to another...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
6
by: John Salerno | last post by:
My code is below. For now I'm focusing on the lines where health (and armor) are increased in each character class. Let's say I decided to change the amount of increase in the future. As it is now,...
0
by: rbg | last post by:
Have a web application which uses Data Cache. I need to understand what happens when a new instance of the same web application is created for for serving concurrent clients. What happens when...
2
by: De_Cisse | last post by:
Hi all, I'm working on an application in which I already make some preparations to be able to work in a frontend and backend database, even if this isn't the issue a this moment. I'm using VBA...
6
by: Johnny Jörgensen | last post by:
I've got a usercontrol derived from a normal ComboBox that contains some special formatting code. On my main form I've got a lot of my custom comboboxes. I discovered a bug in the derived...
2
by: Jurjen de Groot | last post by:
I will be developping a planning application for wich it's necessary for multiple users to view and edit the same data, all changes made by one user, must be visible to the other user's more or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.