Hi
I am using VB 2010 express. I am developing an application to handle my wife's little business so it has timesheet tracking, invoicing, expenses and all the usual accounting parts.
I am trying to make this as modular as possible and one method I was trying was to have a separate application to generate each windows form that will be needed, on demand. I have a main Driver application. The first thing it does is call my form builder with a request ( a simple text string) to build the main menu form. Then I want to pass that empty form (with it's created controls) back to the Driver. It gets displayed and the user selects an option from it.
As an example, let's say they want to enter time-sheets for the week, the Driver calls the Time-sheet application. The first thing this application does is request the Form Builder to build it a form with a data grid and pass it back.
The Form Builder works really well and currently it builds 6 or 7 forms, all with identically laid out controls, so the buttons are the same and in the same place etc.
Now, the problem. I cannot find anyway to pass this generated form back to the caller.
I have looked at Memory files, etc, but apparently you cannot serialize a form.
I have looked into routing and that seems like overkill.
I have got the caller to find the process and I can get the window handle successfully but I cannot for the life of me find a way of saying "MyForm = Discovered window handle.MainForm"
Am I going about this all wrong or have I missed something ?
I have worked for over 35 years on old archaic mainframes and it seems that this should not be a difficult task, but I am struggling.
I would post some code, but I know you would all just start laughing :-)
Cheers for any help, and keep up this great work.