A multiform ComboBox question

  • Thread starter Thread starter Ing. Rajesh Kumar
  • Start date Start date
I

Ing. Rajesh Kumar

Hi everybody
I have a windows project with many forms (Not MDI). Depending upon what the user is doing, system shows a different form "ShowDialog()" where user must do something and click OK. Almost all the forms has a ComboBox which loads the same data on Form_Load. I am writing the same code in every form's Form_Load method. I just wanted to ask if there is an intelligent way of doing this ? I mean if it is possible to write the code only at one place ?

Thanks in advance
Raja
 
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C41E72.F13A6EA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi everybody
I have a windows project with many forms (Not MDI). Depending upon what =
the user is doing, system shows a different form "ShowDialog()" where =
user must do something and click OK. Almost all the forms has a ComboBox =
which loads the same data on Form_Load. I am writing the same code in =
every form's Form_Load method. I just wanted to ask if there is an =
intelligent way of doing this ? I mean if it is possible to write the =
code only at one place ?

Thanks in advance
Raja

You can write the common code in one form, and all the others can
inherit from it...
 
Back
Top