C# - New COM Component In Old Codebase Does Not Expose New Properties?

May 15, 2012

I maintain a WinForms application that uses a third party COM component. We recently upgraded to a new version of the component with some additional properties/features (all old properties are intact), but I could not get Visual Studio to detect the new properties. It acted very much like it was hanging onto a reference to the old version of the component. Here are the steps I took to try to clear it:

Deleted the form that was consuming the component (copied out code first). The only control on this form was the third party component.
Removed the reference to the old component Deleted the bin and obj folders in the solution directory so that the PIA's would get newly created when I added the new control Uninstalled the old component, installed the new one Opened the solution, added the reference to the new component Added a form to the application, dropped the component onto the form and gave it the same name the old control had (so that the rest of the application didn't have to be refactored Pasted the form code back in place At that point the application would compile and run, but I could not get Intellisense to detect the new properties, and if I put them in place anyways the application would not compile. Nothing I tried would get the new properties to show.

View 1 Replies


ADVERTISEMENT

Expose A UserControl's Properties To Properties Window In Designer?

Aug 19, 2009

Is there a way to expose a UserControl's properties to the Properties Window in the Designer?

View 3 Replies

C# - Expose An Enumeration From A Wrapped COM Component

Sep 3, 2010

I'm writing a class library in .NET that wraps a COM dll and exposes specific functionality to be consumed by other .NET code. The COM library has several enumerations defined and I've used some of the enum types as parameters like so:

//C#
public void TransactionTypeSetByEnum(COMComponent.TransactionType transType)
{
this.TransactionType = transType

[Code]....

View 1 Replies

UserControl Expose FONT Properties

Jun 23, 2009

Creating a usecontrol:

The control will have numberous properties available at design and run time.

I am having trouble creating and exposing FONT properties for the child objects.

Example: The control will have a label with a designtime and useradjustable Display font. I wish to

1) be able to set the Font attributes via the properties dialog at design time.

2) set those properties via GUI at runtime.

The problem...

Code:

Private propArtistHeaderFont() As Font
Public Property ArtistHeaderFont() As Font
Get

[Code].....

So clearly I can not pass the FONT properties back and forth via the SET/GET method.

View 2 Replies

Expose Properties Of A WPF Control To The WinForms Host?

Apr 19, 2011

I've got a WPF control hosted inside a Windows Forms form via ElementHost. My WPF control (let's just call it WpfControl for the sake of an example) contains a variable that I'd like to expose to my Form.

View 1 Replies

Expose Methods And Properties Of User Controls Contained In A Collection?

Mar 9, 2009

at some points, I need to call the same method on those controls (ex. user presses the clear button on the big control, I want to call the clear f(x) on each of the controls)I thought to toss the controls in a collection, and then be able to handle them something like this:
nextturns out, and I should have realized, methods and properties of controls are not exposed when treated this way. The only thing that can be seen is the stuff that the base class (control, I guess) has.

View 2 Replies

VS 2008 Expose "Stop" Properties In Route Class?

Jan 17, 2010

I have two classes clsRoute and clsStop. Each route has a collection of stops. So I created a Stops collection in the route class and a method to add stops and remove stopsThis seems to work for me. owever, the clsStop properties that I declared are not showing in intellisense.i.e. oRoute.Stops.item(i).StopName and oRoute.Stops(i).StopName

Public Class clsStops
Private _stopNumber As Integer = 0
Private _stopName As String = String.Empty

[code].....

View 4 Replies

Configuration Code That Uses CodeBase Tag With A Binding Redirect

Mar 24, 2010

Can anyone post some example code for an App.config file that uses a binding redirect with the CodeBase tag and an href attribute that points to a file system location? I can't use a standard binding redirect because it is a 3rd party dll that includes the version number in the dll name.

View 5 Replies

VS 2010 Referencing A Remote Assembly Codebase?

Feb 15, 2012

Currently I have a need to reference a class library dll that is not located in the same directory as the exe nor its subdirectories. Can anyone point me in the right direction on this? Are there any good articles or tutorials on it? I have been looking through my .Net books and some go into details in a different direction and none that I have seem to cover it. To be honest, if theres a nice tutorial or article on this topic with sample code to look at, that would be ideal at this point in my project (Im literally presenting on it twice tomorrow).

I have to admit that Im fairly ignorant of this topic, but its my understanding that I should be able to accomplish this using the assemblyBinding elements in the application configuration. If I do use a codebase approach with the app config, am I suppose to do something in the exe code to read the config and load? The class library that Im refrencing am I supposed to have any special methods or classes in it to make this work? I think I have more questions than answers.

If you want more of the nitty-gritty details on the current scenario, here it is:

I have an executable Ive developed (well call this myApp.exe). I also have a centralized data-accessing class library (well call this appData.dll). This exe actually utilizes a framework Ive designed to run from within a third-party companys application. To ensure the myApp.exe is more maintainable and accessible, it will be located separately from the framework.dll and the appData.dll. The framework.dll will most likely reside in the same directory as the third-party exe, but separate from the appData.dll and myApp.exe. So I was considering applying the assemblyBinding elements in the application configuration files for the myApp.exe pointing toward the framework.dll and the appData.dll while that for the framework.dll will be pointing toward the appData.dll (this is why the data access library file is central between the two).

View 5 Replies

Clean Elegant Solution To Form-class Level Component Collection Initializing Before Initialize Component?

Feb 3, 2011

I am converting an old Vb6 solution to .net 2.0 in vs2010. I've been working in C# for about 3 years now and .net for 5. I don't recall having this problem in C#, but if I want initialize a readonly collection of DerivedControlFoo Is there a clean way to do it besides creating a sub to do it all off somewhere else? I'd love to be able to do it at the class level at the declaration for readability and simplicity.

View 1 Replies

Create A DLL Component For Database Operation And Use Created Component In Another Project

Mar 1, 2010

Create a DLL component for database operation and use created component in another project. Required methods, events and properties

a. Connect
b. Add
c. Delete
d. Save
e. Record navigation (first, next, previous, last)
f. Properties for all database fields
g. Events for validation of database fields.

View 1 Replies

C# - Change A Component Name In A Component Designer In WinForms .Net

Jan 8, 2010

I've created a component whose name I'd like to be able to change while editing in the component tray. I've added a Designer action for a name property, but now I'm stuck.

Looking at the property grid, I can see that the name property is parenthesised, indicating that it's not a regular property.

View 1 Replies

Expose An Object As Property?

Aug 26, 2009

I want to create a class that inherit from a polygon this is not possible because the polygon is not inheritable. I want to create a class that handle a polygon anyway and it behave like a polygon. Wile with the property i can pass the value from the class to the polygon but if I want to do something like

[Code]...

View 4 Replies

Expose ILIst Members To 6.0 Through COM

Nov 23, 2010

i have to develop API in .Net 4.0 which can be used in VB 6.0,i know how to use this and currently i am using my this API in VB successfully.but Stuck at one place,i have collection class and i have to expose it to VB with having functionality of List class of .Net.[code]i know that generic is not supported in VB, but i think with this declaration in VB 6.0 it creates interface class for class B as IList.but in VB using object creation of class B it doesn't provides me members of LIST in intellesense like (Add,Remove of List Class)

View 2 Replies

Expose Information About A Running .NET Exe?

Jun 6, 2010

I have a .NET exe that I wrote and it has a couple properties that I made public and want to expose.

I want to shell this exe (Process.Start()) and then somehow reference this exe and get access to these public properties. These properties expose information about the running exe.

I know how to shell to the exe. And I know how to add a reference to the exe from my project that I want to use this object. But how do I get access to the properties of this running exe?

If you do know the answer maybe you could just tell me what the standard method is to expose properties of a running exe to another application at run-time.

View 5 Replies

What Detail Level Should Expose

Aug 27, 2009

Say I have a class that stores a value, and raises events when that value is changed:

[code]...

also say that I have a container class which contains a number of objects of this style, and raises its own event when any contained object changes its value:

[code]...

Given this setup, what is the best way to expose the stored variables in the StoreEventMonitors class? As three integers As three RaiseEventWhenStoredValueChanges objects?there is a good reason to use three different event-raising Objects, instead of simply writing a new class which stores three integers.

View 5 Replies

.net - Expose Methods Of Nested Class?

Apr 23, 2012

I have a Public Class called "ClientConnection". Inside that class, I have a Public ReadOnly Property called "FileTransfers(ByVal TransferID)". The property returns an object of the class "FileTransfer". All methods in FileTransfer are set to public.

VS is able to discover the methods inside the parent class "ClientConnection". How would I expose the methods inside the sub-class "FileTransfer" that is returned by the property "FileTransfers(ByVal TransferID)"?

Public Class ClientConnection
'irreverent code removed
Public ReadOnly Property FileTransfers(ByVal TransferID As Integer)

[Code].....

View 1 Replies

Cannot Expose Type Through A Class File?

Jul 23, 2009

Does this mean that the type is not set up correctly?If you're not living on the edge, you're taking up too much room

View 5 Replies

Expose A .NET Public Const To COM Interop?

May 18, 2010

For historical reasons, we need to expose string constants in .NET through COM interface.We managed to expose ENUM but we can't find a way to expose string const.We try the following code :

[Code]...

View 1 Replies

Expose A Font Dialog Similar To The Following?

Sep 12, 2010

I am attempting to do something which isn't particularly obvious (to me at least). Digging around on the web I located the following sample (notice the font sample appears in the list on the left?).[URL] Now I know how to use the font dialog from VB.Net, but don't know the appropriate property to set to get the example to show in the listbox/listview? I set the same properties as the author but it shows a plain text font. I am basically attempting to save my users from having to click through every font to see what they each look like.

[Code]...

View 2 Replies

VB To C# Translation - Expose The Public Interface In C#?

Aug 31, 2010

In VB (ASP.NET)

Application("myapp")= Server.CreateObject("APP.Engine")
aa = Application("myapp").myMethod(2)

works.

In C# I tried

Application["myapp"]= Server.CreateObject("APP.Engine")

but

Application["myapp"].myMethod(2)

fails with 'object' does not contain a definition for 'myMethod'How can I expose the public interface in C#?

View 4 Replies

Asp.net - How To Get Classes To Expose The Same Shared/Static Method

Mar 4, 2010

I have a base class with several derived classes. I want all of my derived classes to have the same Public Shared (static) method with their own implementation. How do I do this? Is it even possible?

View 3 Replies

How To Expose ComboBox On User Control For DataBinding

Aug 8, 2011

I'm creating a composite user control and trying to exposing the controls as properties so that I can databind them from the form that I drop the user control onto. One of the controls I'm trying to expose is a combobox and I can't seem to figure out how to expose this combobox to the designer. I'm trying the following code that I've cobbled together from what bits of documentation I can find but so far no joy.

<Category("Data"), Bindable(True), _
Browsable(True), EditorBrowsable(EditorBrowsableState.Always), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible), _
AttributeProvider(GetType(IListSource))> _
Public Property RollbackCombo As ComboBox
[Code] .....

View 1 Replies

Inheriting Forms - Expose Control Events?

Nov 2, 2009

I am using an inherited form extensively for the first time, and I'd like to know if what I'm doing is correct.I have a base form with a grid and four buttons (Add, Edit, Remove and Close). There is no functionality in any of the button click events, as the specific implementation of each derived form will be different. The only exception perhaps is that the Close button closes the form. The only reason I am using a base form really is because I've many forms that look the same.How do I now expose the button click events to any derived forms? The only straightforward way I could think of was to have the button click events call an Overridable method, which I then override in the derived form:

Public Class frmTableBase
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Me.AddButtonClicked()[code]...

Is that the correct way? It seems a little bit overkill to have to do this, although I can't think of another way really... Perhaps I could add the Overridable keyword to the event handlers themselves (and make them public)..?I'm doing it the way I showed now however. It works, but I'd just like to know if this is the generally accepted way of doing this.

View 3 Replies

Why Not Expose List (Of String) In The Parameters Of Web Service

Dec 9, 2009

The FxCop says in a rule that generic List should not be exposed to the outside world.But I do not understand why and what is the replacement for the generice List? url...

View 4 Replies

.net - Expose WCF Service Cannot Retrieve Object Through Windows Firewall?

May 13, 2011

I built a WCF service that exposes itself for a web application, it accepts an object and prints the data on the clients machine. Works fine on my development machine, and the service is up and running on any machine i install it on. I can enter ip address in clients machine web browser and see it is running. Problem is when i send the object to the clients machine it returns an error, that sounds like it could be because of the clients windows firewall. Where would i start at to deal with this problem ?There was no endpoint listening at http://192.168.1.168:2202/PrintLabel that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

View 1 Replies

Asp.net Mvc - Expose Built-in Security And User Management To A MVC Application?

Jul 23, 2009

I have built a MVC website on IIS6. I used the built-in ASP.NET Security without Membership, just the way it was implemented in the template solution. It is easy to secure a contoller or action, but now I need to expose the user management to an admin logged into the site. I understand that the builtin ASP controls for doing this are not "best practice" and are a dog to get working. So what is the best practice for offering user management through a ASP.NET MVC application?

I considered using the Entity Framework and wireing it up to the myriad of stored procs. but that seems awkward. I see options for AccountMembershipService and FormsAuthenticationService. That is what the existing project account controller uses. But, I am not fimilliar with either.I can't help but think that this should have already been there from the project template. This is a fundamental part of any website and you were given 15%, why not the rest?

View 5 Replies

Expose A Function Inside A Module In Class Liberary( DLL)

May 20, 2009

I wand to Expose a function inside a module in my Class Liberary( DLL)

module Module1
Public Function Add(val1 , val2) as double
return val1 + val2
End Function
End Module

View 7 Replies

Transactions - Expose Private Fields Using A Partial Class?

Nov 12, 2010

I am trying to implement transactions across multiple TableAdapters in VB.NET (using Visual Studio 2010) by extending the partial class as described in the following examples:

http://blah.winsmarts.com/2006/06/18/the-definitive-tableadapters--transactions-blog-post.aspx
madprops.org/blog/typed-datasets-and-sqltransaction/
stackoverflow.com/questions/2342289/net-tableadapter-to-dataadapter

However, when I attempt to expose any of the private fields created by the designer they are underlined in the editor with the following error:

'_adapter' is not declared. It may be inaccessible due to its protection
level.

Searching this site as well as google has not revealed anything useful, but perhpas I'm searching the wrong keywords.

Here is the code in MyDataset.vb

Partial Public Class MyTableAdapter
Public Property MyTransaction() As SqlTransaction
Get

[code]....

View 1 Replies

VS 2008 : Expose HTTP Access To A Background Service?

Dec 16, 2011

I'm creating an executable that will run as a background service.I want to communicate with this executable with a browser - similar to how you talk to sophisticated copiers in a big office.and was told to build an HTTP interface in that app.All the examples of httprequest and httpresponse I can find are about talking to web sites - or public services.How would I go about having my app "fire an event" when an async POST is made from a browser page? How do I wait on a port in the app?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved