Author Topic: ObjectDisposedException  (Read 1396 times)

andrew_pj

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
ObjectDisposedException
« on: May 06, 2015, 04:15:10 AM »
I am using AdvancedHMIBetaV398g, and communication with ModbusTCP.
Scenario:
I have GraphicIndicator. Clicking this indicator, showing form.
Code: [Select]
Private Sub GraphicIndicator1_Click_1(sender As Object, e As EventArgs) Handles GraphicIndicator1.Click
        AdvancedHMI.BAV01.Show()
    End Sub

The form contains BasicButton. Clicking button, it writes 1 to 412288.
Function works fine. But after closing the form, ObjectDisposedException occur.
Please advise the solution.
Thank you.

Best regards,
Andrew

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: ObjectDisposedException
« Reply #1 on: May 06, 2015, 07:28:27 AM »
I'll look into this, but a work around is to hide the form instead of closing it.

andrew_pj

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: ObjectDisposedException
« Reply #2 on: May 06, 2015, 08:55:59 PM »
Thanks Archie.
The form is actually like a pop-up window.
And I close by clicking default close button on top right of the form.

After testing I noticed that the "MaximumHoldTime" of "BasicButton" is 3000 (default).
So when I click the button, the value may be held for 3 seconds.
If the value remains (not returned to 0 yet), and I close the form, the error appears.

Best regards,
Andrew