backup event handler
wolfino
✭✭
Hello,
Iam testing an app to create a backup on a remote disc. but Iam having troubles with "backup finished" event handler. Iam using RW 5.10.3007.03. On the virtual system it works ok but on the real system the backup is created but the event is not executed. Can anybody tell me what I do wrong? My code looks somethink like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim BackupDirName As String
Dim BackupDir As String
Dim LocalDir As String
Acontroller = New Controller
'adding handler
AddHandler Me.Acontroller.BackupFinished, AddressOf Acontroller_BackupCompleted
'backup name
BackupDirName = "backup1/"
'path
LocalDir = "pc:/"
BackupDir = LocalDir + BackupDirName
Me.Acontroller.Backup(BackupDir)
End Sub
Private Sub Acontroller_BackupCompleted(ByVal sender As Object, ByVal e As BackupEventArgs)
TpsLabel1.Text = "Backup ready"
End Sub
Thanks
0
Comments
-
Hello,I think you get the event on the real FP, but the code to update the GUI is not correct.Controller events are always received on a background thread. II see in your event handler that you want to make an update of the GUI when you get the BackupFinished event. To be able to do that you must enforce execution to the GUI thread by the use of Invoke. See how to do this in User's Guide.Best regards,
Ingela Brorsson
Software Engineer
ABB Robotics, Sweden0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings