C# beginner wrote:
Hi all,
I am using SQLDMO.Backup for backing up SQL server
databases. I need to implement a progress bar to show the
progress. I have some sample VB code that is like this:
Dim WithEvents oBackupEvent As SQLDMO.Backup
Set oBackupEvent = oBackup ' enable events
You will need to declare the SQLDMO.Backup object so it has scope
throughout where you want to use it (usually the whole form).
private SQLDMO.Backup oBackupObject = new SQLDMO.Backup() ;
in the form constructor or wherever, add a handler for the event;
oBackupObject.P ercentComplente += new
SQLDMO.PercentC ompleteDelegate NameHere(this.S QLBackupPercent Complete);
this points to
private void SQLBackupPercen tComplete(strin g message, long percent)
{
...
}
if you type in oBackupObject.P ercentComplente +=, you should be able to
press tab and the ide should fill in the rest for you.
HTH
JB