Screenupdating

  • Thread starter Thread starter Graeme
  • Start date Start date
G

Graeme

Hi all

I click OK on a dialog which should then disappear, and a database operation
takes place for a few minutes. Trouble is, dialog sometimes stays atop until
operation finished ... doesn't hurt, but looks bad. How to refresh form
please?

Thanks again
Graeme
 
* "Graeme said:
I click OK on a dialog which should then disappear, and a database operation
takes place for a few minutes. Trouble is, dialog sometimes stays atop until
operation finished ... doesn't hurt, but looks bad. How to refresh form
please?

Post the code you use to close the dialog and start the update.
 
Hello Herfried.

I guess this is the point ... I don't specifically 'close' the dialog. Maybe
I should somehow? See code below.

myResult = MessageBox.Show("Are you sure you want to update ODRC lives and
costs? This process updates the assets database table and can take several
minutes.", "Update ODRC?", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1)
If myResult = DialogResult.No Then gbxODRCRequirements.Visible = False :
Exit Sub

If myAssetType = "Equipment" Then

RecalcODRC()

ElseIf myAssetType = "Structures" Then

RecalcPoleODRC()

End If

....and so on.

Thanks for your help!
Graeme
 
Back
Top