Re: I'm in over my head...
on your first scenario...
since the employees list form and the employee benefits form technically refer to information regarding employees, why not put them both on the same form, and use a tab control instead? that way, tab page 1 for example, contains the employee listing, and tab page 2 may contain the benefits information...what do u think..?
i will get back to you on your second scenario...(i think u will have to learn transferring info from one form to another...its not that hard...)
hope this helps...
Re: I'm in over my head...
Thanks for the reply!
To answer your question...the employee list form is a generic form that will be used by MANY other forms in the application. I am going to have HR screens, benefits screens, work comp screens, payroll screens...I wanted to create one generic "dialog window" that can be called by many of the other screens in the system to return a particular employee.
Re: I'm in over my head...
ok then...in that case, i suggest creating an MDI application.that way, all forms will be "contained" inside a single "container", and window management will become a lot easier...
as for transferring data from one form to another, its relatively easy, it just depends on what type of controls you are using...
il send u a sample app that sends (transfers) info from textboxes from Form1 to Form2, as soon as i find where the #$%^&* app is... :D
Re: I'm in over my head...
Show those popup forms as Modal dialog(Form.ShowDialog()). You need to have "OK" and "Cancel" button in the form. Whatever the data that is entered in the Form should have corresponding public variable or property. Update the Form.DialogResult property when the OK or Cancel button is clicked.
When the user click "OK" or "Cancel" button, the code flow will return to the place where you called "ShowDialog()" method. There, check the dialog result. If it is ok, then retrieve the data from the form object (even though the window is closed, the form object will still be there in memory)
[The following code is in C#. Please convert it to VB.NET]
Code:
MyForm frm = new MyForm();
DialogResult result = frm.ShowDialog(<parent form object>);
if (result = DialogResult.OK)
{
// get the values from MyForm object
string somstring = frm.SomeValue1;
int someint = frm.SomeValue2;
..............................
}
1 Attachment(s)
Re: I'm in over my head...
i couldnt find the old app, so here's a new one.its very crude, but it might help u in some way...
pls find the attached zip...to use, run the app,display both child forms, press the transfer button, then see what happens...
happy coding!
Re: I'm in over my head...
Thanks a TON everyone! With all of your help I was able to figure it out.