Getting Values From another Form dialog
-
Hello All, I have one form name Form1 and from Form1 i have declared as follws ------------------------------- Private frm2 as new Form2 frm2.showdialog(Me) ------------------------- Now frm2 open and get some values in textboxes,in my case i want to retun back this values to previous Form's Datagrid ,(means Form1's Datagrid) for displaying, How can i solve this,anybody can help me will be appreciated:zzz:
-
Hello All, I have one form name Form1 and from Form1 i have declared as follws ------------------------------- Private frm2 as new Form2 frm2.showdialog(Me) ------------------------- Now frm2 open and get some values in textboxes,in my case i want to retun back this values to previous Form's Datagrid ,(means Form1's Datagrid) for displaying, How can i solve this,anybody can help me will be appreciated:zzz:
-
Hello All, I have one form name Form1 and from Form1 i have declared as follws ------------------------------- Private frm2 as new Form2 frm2.showdialog(Me) ------------------------- Now frm2 open and get some values in textboxes,in my case i want to retun back this values to previous Form's Datagrid ,(means Form1's Datagrid) for displaying, How can i solve this,anybody can help me will be appreciated:zzz:
-
Hello All, I have one form name Form1 and from Form1 i have declared as follws ------------------------------- Private frm2 as new Form2 frm2.showdialog(Me) ------------------------- Now frm2 open and get some values in textboxes,in my case i want to retun back this values to previous Form's Datagrid ,(means Form1's Datagrid) for displaying, How can i solve this,anybody can help me will be appreciated:zzz:
you can do one thing First you declare the friend or public variable in then you cn call us follows In form1 Write as follows dim frm as new Form2 frm.Showdialog(Me) me.DataGrid = frm.PublicVarDataTable In Form2 Public PublicVarDataTable as datatable OkBut_Click() // add rows in table Me.DialogResult=ok Me.Hide End sub I hope this helps:laugh: Ishak
-
Hello All, I have one form name Form1 and from Form1 i have declared as follws ------------------------------- Private frm2 as new Form2 frm2.showdialog(Me) ------------------------- Now frm2 open and get some values in textboxes,in my case i want to retun back this values to previous Form's Datagrid ,(means Form1's Datagrid) for displaying, How can i solve this,anybody can help me will be appreciated:zzz:
whasup! You just need to create properties which will contain the values read from the textbox. After you have those values simply dispose your form2 object.After this you still can access the properties of the object because only the visual were disposed you can retrieve the properties by doing: myForm2Object.property1 myForm2Object.property2 (...) myForm2Object = nothing this way you won't need modules. Never say never