A
Andrew MacLean
Hello all,
I am fairly new to .NET, but not to VB. I have a couple of questions.
1. Shared Code Base
I have a solution with several different applications within it. Many of
the applications perform similar functions, such as checking data values for
nulls, or building formatted strings. I have created a module (General
Functions.vb) to contain these. However, when I add the module as an
existing file to my project, .NET's IDE appears to copy the file into the
current code directory. Therefore, each of my applications end up with a
new instance of the module. If I then change a routine, or add one to the
one in the current application, other applications don't see the changes.
Is there a way to link to a module from a common location such that all
applications will use the same instance, instead of individual instances for
all?
2. Obects In A Listbox.
Here is a question that I am fielding becuase I don't have enough time to
fight over it if it doesn't work.
I have created a custom control that searches through a database
containing geocoded address information. As such, it has several
properties, such as street number, street name, city, X, Y, postal code,
zone, etc. There are about 15 properties in all that are required for my
application.
In my application, a user can register multiple addresses (up to 10) for
his or her use. Therefore, for each customer in my Customers database,
there may be up to 10 addresses in a seperate table that are keyed on the
customer.
From a UI perspective, I have a single address search control, and a
listbox to which the user can add the address found by the control. The
listbox only shows general information such as street number and street name
for each item. However, I need to be able to store with each list item the
entire set of properties.
Using .NET, can I add a copy of the control in its current state as the
equivalent of ItemData? I know that .NET no longer supports this, so I have
gone through the process of creating a class with a text and integer
property for other uses. I guess what I would be trying to do is the same
thing in principle, that being a class that contains a text property, and a
object property that I could pass an entire instance of the address control
into By Value. If I later change the properties of the control on in the
UI, I need the copy stored with the list item to remain as it was when it
was copied in.
Sorry for the length, and thanks for the help,
Andrew MacLean
I am fairly new to .NET, but not to VB. I have a couple of questions.
1. Shared Code Base
I have a solution with several different applications within it. Many of
the applications perform similar functions, such as checking data values for
nulls, or building formatted strings. I have created a module (General
Functions.vb) to contain these. However, when I add the module as an
existing file to my project, .NET's IDE appears to copy the file into the
current code directory. Therefore, each of my applications end up with a
new instance of the module. If I then change a routine, or add one to the
one in the current application, other applications don't see the changes.
Is there a way to link to a module from a common location such that all
applications will use the same instance, instead of individual instances for
all?
2. Obects In A Listbox.
Here is a question that I am fielding becuase I don't have enough time to
fight over it if it doesn't work.
I have created a custom control that searches through a database
containing geocoded address information. As such, it has several
properties, such as street number, street name, city, X, Y, postal code,
zone, etc. There are about 15 properties in all that are required for my
application.
In my application, a user can register multiple addresses (up to 10) for
his or her use. Therefore, for each customer in my Customers database,
there may be up to 10 addresses in a seperate table that are keyed on the
customer.
From a UI perspective, I have a single address search control, and a
listbox to which the user can add the address found by the control. The
listbox only shows general information such as street number and street name
for each item. However, I need to be able to store with each list item the
entire set of properties.
Using .NET, can I add a copy of the control in its current state as the
equivalent of ItemData? I know that .NET no longer supports this, so I have
gone through the process of creating a class with a text and integer
property for other uses. I guess what I would be trying to do is the same
thing in principle, that being a class that contains a text property, and a
object property that I could pass an entire instance of the address control
into By Value. If I later change the properties of the control on in the
UI, I need the copy stored with the list item to remain as it was when it
was copied in.
Sorry for the length, and thanks for the help,
Andrew MacLean