Hi all,
I did create a user control which has Add, Mod and Del buttons.
I inherited the user control in one of my forms.
In the same form i have a tabpage control, and one of the pages have entry fields where user enters relevant values.
After entering the values, On selecting the Add button, the control goes to the class of Inheritied user control, where i have overrieden the button_click events of the base user control. Now how do i take the values from the form to this class.
Inside the form if i print form1.cmbAmount it prints me the correct value.
But in the inherited user control class, after importing the form class, i give
Dim objfrm as new myproject.myform
msgbox obhfrm.cmbAmount
This returns null. I can understand why it returns null. The scope of the control variable is lost. But cannot understand how to get the value of the form to this class.
Please help.
I did create a user control which has Add, Mod and Del buttons.
I inherited the user control in one of my forms.
In the same form i have a tabpage control, and one of the pages have entry fields where user enters relevant values.
After entering the values, On selecting the Add button, the control goes to the class of Inheritied user control, where i have overrieden the button_click events of the base user control. Now how do i take the values from the form to this class.
Inside the form if i print form1.cmbAmount it prints me the correct value.
But in the inherited user control class, after importing the form class, i give
Dim objfrm as new myproject.myform
msgbox obhfrm.cmbAmount
This returns null. I can understand why it returns null. The scope of the control variable is lost. But cannot understand how to get the value of the form to this class.
Please help.