Form communication, run time!!

  • Thread starter Thread starter VJ
  • Start date Start date
V

VJ

Private Sub GetData()

'Starting to fetch Master Data Set
dsData = GetDataSet()

'Show Cancel dialog form
frmCancel.show()

For each dtRow in dsData.Tables(0).Rows

if frmCancel.CancelClicked then 'CancelClicked is a
property in the frmCancel, it is set when cancel is clicked in the frmCancel
Exit For
end if

'Get Detail DataRow...

Next dtRow

'End Data Fetch
'Commint and Display data...

End Sub

The above code perfectly works when complied and run from VS Studio(Debug
mode)... , but when I run as a exectuable, I am not able to click on the
cancel button on the frmCancel. The whole screen is locked until the GetData
is finished...

What do I do?

VJ
 
The above code perfectly works when complied and run from VS
Studio(Debug mode)... , but when I run as a exectuable, I am not able
to click on the cancel button on the frmCancel. The whole screen is
locked until the GetData is finished...

What do I do?

Put the function in it's own thread.
 
VJ,

Are you sure it is running in debugging mode, I tested your sample and it
does exactly what you told it is doing in exe time when I have it in
debugmode.

Sollutions, add a thread as told or not so nice an application.doevents.

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top