473,549 Members | 2,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

refresh com control

cj2
I had to add a reference to a com control / dll into my VB.net 2008
program. It didn't work as it should and I was given another version of
the dll to replace it with. The dll had the same name. I copied the new
dll to c:\windows\syst em32 directory on my XP machine overwriting the
copy that was there. I then ran REGSVR32 on it and it reported it
registed it. Problem is it didn't change how it works. I think now
that VB needs to refresh where I added the reference to it into the
project. How do I do this?
Sep 4 '08 #1
2 1317
Hello CJ,

There are several points that you would need to pay special attention to
when refreshing the com control:

1. COM component itself.

You would need to make sure that the new component was compiled with
"Binary Compatibility". In other words, the class and interface IDs are not
changed during the upgrade of the component. See:
http://support.microsoft.com/kb/161137

<quote>
Binary Compatibility
When you compile your project, Visual Basic only creates new Class and
Interface IDs when necessary. It preserves the class and interface IDs from
the previous version(s) so that programs compiled using an earlier version
will continue to work. If you are making a change that will result in an
incompatible version, Visual Basic will warn you. If you want to maintain
compatibility with older, released versions of an ActiveX component, this
is the setting you need to use.
</quote>

"Binary Compatibility" is not the default setting in VB6, so please make
sure it's checked.

2. .NET client app that consumes the component.

According to your description "add a reference to the com component", it
seems that you are using the RCW (Runtime Callable Wrapper) assembly
generated by VS (early binding). Generally speaking, this would continue
working after we install the new component as long as the new is binary
compatible. I suggest your trying these two methods to diagnose this
problem:

a. Use process explorer to view the loaded dlls by your client app.
http://www.microsoft.com/technet/sys...sexplorer.html
process explorer displays the dll version in the "Lower Panel View". Check
whether the dll version matches your new one.

b. Re-generate the RCW by
Step1. removing the original reference of the component from your VB.net
project. (Project -Properties -References -find the interop assembly
and remove it)
Step2. Add the reference again (Project -Add Reference -Browse -find
the new dll and add it)
Step3. Re-compile the project.

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 5 '08 #2
cj2
I hate to say it but I didn't understand much at all of what you said.

Anyway, I deleted it and re-added it and it works. I finally found
where I could do this. I right clicked on the Project in the Solution
Explorer and clicked properties. On the References tab I clicked the
dll and then clicked remove. I then clicked add and put it back in. I
usually add under the class view of the project but I couldn't delete it
there.

Why does it say the dll path it's referring to is in the project
directory? It isn't where I put the dll and registered it. VB appears
to have made a copy of it in the project directory.
Jialiang Ge [MSFT] wrote:
Hello CJ,

There are several points that you would need to pay special attention to
when refreshing the com control:

1. COM component itself.

You would need to make sure that the new component was compiled with
"Binary Compatibility". In other words, the class and interface IDs are not
changed during the upgrade of the component. See:
http://support.microsoft.com/kb/161137

<quote>
Binary Compatibility
When you compile your project, Visual Basic only creates new Class and
Interface IDs when necessary. It preserves the class and interface IDs from
the previous version(s) so that programs compiled using an earlier version
will continue to work. If you are making a change that will result in an
incompatible version, Visual Basic will warn you. If you want to maintain
compatibility with older, released versions of an ActiveX component, this
is the setting you need to use.
</quote>

"Binary Compatibility" is not the default setting in VB6, so please make
sure it's checked.

2. .NET client app that consumes the component.

According to your description "add a reference to the com component", it
seems that you are using the RCW (Runtime Callable Wrapper) assembly
generated by VS (early binding). Generally speaking, this would continue
working after we install the new component as long as the new is binary
compatible. I suggest your trying these two methods to diagnose this
problem:

a. Use process explorer to view the loaded dlls by your client app.
http://www.microsoft.com/technet/sys...sexplorer.html
process explorer displays the dll version in the "Lower Panel View". Check
whether the dll version matches your new one.

b. Re-generate the RCW by
Step1. removing the original reference of the component from your VB.net
project. (Project -Properties -References -find the interop assembly
and remove it)
Step2. Add the reference again (Project -Add Reference -Browse -find
the new dll and add it)
Step3. Re-compile the project.

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
Sep 5 '08 #3

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

Similar topics

6
8773
by: Arnold | last post by:
Hey there, I've browsed for some fixes to this but only found a couple of similar posts, which didn't solve my problem. I'm wondering how to refresh an image control in a form after a user clicks a cmd button to open the Windows API Common Dialog and selects a new file (jpeg). Images are initially loaded in the form's oncurrent event. ...
4
8229
by: Yogi_Bear_79 | last post by:
Self Taught here so please bear with me. I have the labelRestrictSites as private on the MainForm.cs. I then access the labelRestrictSites.Text thru the public string LabelRestrictSites from another class. So when I add labelRestrictSites.refresh code to my class I get an error because the labelRestrictSites is private. How would I...
2
1888
by: Peter Oliphant | last post by:
I now have graphics being drawn in the Paint event of my form (yeah, and it's very cool). Problem was that it only updated any changes to these graphics when Paint was called. So, I then made it so the Refresh() method of the form was called for each graphic object. In this case it drew just fine, but Paint was being called so often I lost...
1
3345
by: ppatel | last post by:
Problem I have a problem with web image button control click event. The click event does not get trigger until it has not been clicked once or page refresh occures(which is fine). When click event fires first time it executes code associate with click event(As I expected). the problem is when you refresh page it fires a click event...
17
8501
by: SamSpade | last post by:
picDocument is a picturebox When I do picDocument.Invalidate() the box paints. But if instead I do picDocument.Refresh() the box does not paint. What does Refresh do. I guessed it did an Invalidate and an Update. Can someone shed some light?
0
1079
by: Allan Bredahl | last post by:
Hi all Im currently constructing a Windows control that inherits from RichTextBox, but I'm having a bit of trouble with updating the control at design time. The senario is SIMPLIFIED as follows: My RichTextBox control : Public Class Crtb
1
3518
by: KatMagic | last post by:
Is there a way to automatically refresh a user control? I have a page where I automatically refresh the page with <meta http-equiv="refresh" content="600"> The page loads a user control based on a variety of factors on what the user is doing. I need to load the page without the refresh for some controls and with the refresh for other...
0
2797
by: cweeks | last post by:
>From the MSDN documentation for WebBroswer.Refresh(): "The WebBrowser control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is...
3
4748
by: R.A.F. | last post by:
Hi, I have a custom control in which i have a property based on CollectionBase class. like the following one : //------- XGrid.cs file --------------// public ColumnsCollection Columns {
4
2537
by: Simon | last post by:
Dear reader, If I change the content of a field in an event procedure and in the same procedure I do a refresh, the refresh has no effect. The code in the event is as follows:
0
7542
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7467
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7982
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7827
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5385
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3514
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1079
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.