ISDBUICommon::DestroyControl: Difference between revisions

From MediaMonkey Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
{{Introduced|3.0}}
{{Introduced|3.0}}


Apparently this is ONLY for use with browser controls as used in [http://mediamonkey.com/wiki/index.php/Sample_AMG_Search_script|Sample AMG Search script].
All other requirements for removal of controls should use something like this
<source lang="vb">
Set Form1 = SDB.Objects("SyncTheSyncForm")
If Not (Form1 Is Nothing) Then
  Script.UnregisterEvents Form1
  Form1.Common.Visible = False
  Form1.Common.ControlName = ""
  Set Form1 = Nothing 
  Set SDB.Objects("SyncTheSyncForm") = Nothing
End If
</source>
* Note: Form1.Common.ControlName = "" should not need to be used so will be fixed in version 3.1
[[Category:Scripting|{{PAGENAME}}]]
[[Category:Scripting|{{PAGENAME}}]]
[[Category:Automation objects|{{PAGENAME}}]]
[[Category:Automation objects|{{PAGENAME}}]]
[[Category:CoClass SDBUICommon|{{PAGENAME}}]]
[[Category:CoClass SDBUICommon|{{PAGENAME}}]]
[[Category:Interface ISDBUICommon|{{PAGENAME}}]]
[[Category:Interface ISDBUICommon|{{PAGENAME}}]]

Latest revision as of 23:08, 14 May 2008

CoClass SDBUICommon, Interface ISDBUICommon

Sub DestroyControl


Method description

This method destroys a control, it will be removed from UI, you should no longer access properties and methods of its COM object, because it would result in errors.

Introduced in MediaMonkey version 3.0.


Apparently this is ONLY for use with browser controls as used in AMG Search script.

All other requirements for removal of controls should use something like this

Set Form1 = SDB.Objects("SyncTheSyncForm")
If Not (Form1 Is Nothing) Then
  Script.UnregisterEvents Form1
  Form1.Common.Visible = False
  Form1.Common.ControlName = ""
  Set Form1 = Nothing  
  Set SDB.Objects("SyncTheSyncForm") = Nothing
End If
  • Note: Form1.Common.ControlName = "" should not need to be used so will be fixed in version 3.1