my situation is this ..
i have a item class , an entry form where you can add item , select category , subcategory etc ..
selecting a category will call lookup form (modal) form which contains all the pre-define category (which was added using a form) , the code to pass the selected category :
((Items)this.Owner).plookupcode = this.listbox1.selectedvalue)
//this.Owner equates to the form which calls the lookup ; Items
I casted the this.Owner to (Items) so that the value can be passed to the calling form ...
now the problem ..
I want to use the lookup form on other forms e.g. Search Items , but .. the code on the lookup form is hardcoded to cast the "this.Owner" to (Items) .. is there a way to put (Items) to a variable so that I can use the lookup form in any form like :
object CallingForm
CallingForm = Items;
then..
((CallingForm)this.Owner).plookupcode = this.listbox1.selectedvalue
thanks in advance ..
i have a item class , an entry form where you can add item , select category , subcategory etc ..
selecting a category will call lookup form (modal) form which contains all the pre-define category (which was added using a form) , the code to pass the selected category :
((Items)this.Owner).plookupcode = this.listbox1.selectedvalue)
//this.Owner equates to the form which calls the lookup ; Items
I casted the this.Owner to (Items) so that the value can be passed to the calling form ...
now the problem ..
I want to use the lookup form on other forms e.g. Search Items , but .. the code on the lookup form is hardcoded to cast the "this.Owner" to (Items) .. is there a way to put (Items) to a variable so that I can use the lookup form in any form like :
object CallingForm
CallingForm = Items;
then..
((CallingForm)this.Owner).plookupcode = this.listbox1.selectedvalue
thanks in advance ..