HI all,
I have developed one desktop application.In this application i have one form and module.My start up page is module and form object is created in module and set show property in module.I have one datagrid on my form.My application is running properly without using thread.But when i use thread,I got error "Controls created on one thread cannot be parented to a control on a different thread."
Dim grid As New Thread(AddressOf BindGrid)
grid.Start()
This thread is written in form_load event.
Public Sub BindGrid()
'FillGridColumn()
SetGridProperty()
Dim dtData As New DataTable
dtData = CreateTable()
CreateTable()
dg_Records.DataSource = dtData
dg_Records.Visible = True
End Sub
but when i debug my application,i got an error on dg_Records.DataSource = dtData
what i do?Any other solution to write thread in
vb.net?Pls help me.It's urgent.
Thanx
monika