Data Binding Problem.
-
Right, I have a set of Data Access Layer classes that represent their respective SQL Server tables. I have a set of forms where I use the .DataBinding() for each control to bind to properties in my Data Access Layer classes. This was all working great, until I moved the forms into an external .DLL. Now when I call the forms .Show() from the external .DLL I get the message: "An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll" - Additional information: Error creating window handle. I've traced through the code, and the externals forms will fire up perfectly fine into my apps MDI form, as long as no calls to the data binding take place. Is there any reason why Data Binding won't work across .DLLs????
-
Right, I have a set of Data Access Layer classes that represent their respective SQL Server tables. I have a set of forms where I use the .DataBinding() for each control to bind to properties in my Data Access Layer classes. This was all working great, until I moved the forms into an external .DLL. Now when I call the forms .Show() from the external .DLL I get the message: "An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll" - Additional information: Error creating window handle. I've traced through the code, and the externals forms will fire up perfectly fine into my apps MDI form, as long as no calls to the data binding take place. Is there any reason why Data Binding won't work across .DLLs????
........and the solution is.....................pass your controls around by reference and not by value....ta da!!