Code suitable for different projects

  • Thread starter Thread starter Michel
  • Start date Start date
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
 
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
 
Back
Top