Code suitable for different projects

M

Michel

Hello,

I am using a few forms in different projects and add therm as link in each
project.
I want to make the code so general, that they fit in every project they are
linked to.
For instance I want to set the text property of a StatusStrip

mdiProject1.sstProject1Info.Text = "Testing"

but also in Project 2 the same code must apply, so I try to use variables as

Dim strProject = "Project1""
Dim strTest = "mdi" & strProject." & "sst" & strProject & "Info.Text"

strTest = "Testing"

but this does not seem to work.

Can anyone help me how to write genereal code so that it is applicable in
more than one project?

Many thanks and greetings,

Michel
 
A

Armin Zingler

Michel said:
Hello,

I am using a few forms in different projects and add therm as link in
each project.
I want to make the code so general, that they fit in every project
they are linked to.
For instance I want to set the text property of a StatusStrip

mdiProject1.sstProject1Info.Text = "Testing"

but also in Project 2 the same code must apply, so I try to use
variables as

Dim strProject = "Project1""
Dim strTest = "mdi" & strProject." & "sst" & strProject & "Info.Text"

strTest = "Testing"

but this does not seem to work.

Where is the code above located? Can you describe in words what you want the
code to do? Where is the StatusStrip? On the (reusable) Form?
Can anyone help me how to write genereal code so that it is
applicable in more than one project?

Put the Form in a dll and set a reference to the dll in all client projects.


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top