StrataFrame Forum

BackgroundWorker

http://forum.strataframe.net/Topic7607.aspx

By Roger Davalos - 3/20/2007

Hi,

I'm trying StrataFrame and want to know how can I manage the Load and Save with the backgroundworker object, or if there is another easier way to continue working in one form while loading another form, for instance.

Thanks in advance.

Roy

P.S. excuse my english Smile

By Trent L. Taylor - 3/20/2007

Hey Roy,

Your English is just fine!  You can definitley save on threads as we do this ourselves quite often.  In fact, the business object already has a property called DataLayerSavingThreads which allows you to increase the number of threads that will be used when saving records.

Loading just requires that you create a thread (or a backgroundworker thread) and call a Fill method on the BO.

By Roger Davalos - 3/21/2007

Great, thanks for answering.

Another question, how can automaticaly generate the fields in the forms, for instance, textboxes, comboboxes, etc?

By Trent L. Taylor - 3/21/2007

If you are referring to dragging the fields from a BO to a form at design-time, then this functionality does not natively exist...at least at the moment Smile  However, you can dynamically add fields at runtime by just creating a control and adding to the form collecion:

Dim loControl As New MicroFour.StrataFrame.UI.Windows.Forms.TextBox()

'-- Set any properties here like position or binding values

'-- Add the control to the form collection
Me.Controls.Add(loControl)