Hoi,
Een vraag die ik hier een tijdje geleden stelde, heeft een staartje.
[url= [rml][ VB6] unloaden uit ControlArray[/rml]]dit is een link naar de eerdere vraag [/url]
In een groot aantal events kun je geen controls uit een ControlArray unoaden. (zie onder)
De vraag:
Is er een manier om te detecteren of een van die events op het moment afgehandeld wordt?
Even een voorbeeld, want dit was wel erg compact geformuleerd:
Ik heb een Sub die controls unload.
Die Sub kan aangeroepen worden vanuit allerlei plekken in mijn script, waaronder een ComboBox_Click event (Dat mag dus niet).
Kan ik nu in mijn sub detecteren of er een ComboBox_Click event afgehandeld wordt, zodat ik een fout kan voorkomen?
Met een gefundeerd "nee" ben ik ook blij.
Wilde_Bill
'--------------hier de gevallen waarin je niet mag unloaden---------------------------
In some situations you are not allowed to unload a form or a control on a form. This error has the following causes and solutions:
There is an Unload statement in the Paint event for the form or for a control on the form that has the Paint event.
Remove the Unload statement from the Paint event.
There is an Unload statement in the Change, Click, or DropDown events of a ComboBox.
Remove the Unload statement from the event.
There is an Unload statement in the Scroll event of an HScrollBar or VScrollBar control.
Remove the Unload statement from the event.
There is an Unload statement in the Resize event of a Data, Form, MDIForm, or PictureBox control.
Remove the Unload statement from the event.
There is an Unload statement in the Resize event of an MDIForm that is trying to unload an MDI child form.
Remove the Unload statement from the event.
There is an Unload statement in the RePosition or Validate event of a Data control.
Remove the Unload statement from the event.
There is an Unload statement in the ObjectMove event of an OLE Container control.
Remove the Unload statement from the event.
'--------------------------------------
Een vraag die ik hier een tijdje geleden stelde, heeft een staartje.
[url= [rml][ VB6] unloaden uit ControlArray[/rml]]dit is een link naar de eerdere vraag [/url]
In een groot aantal events kun je geen controls uit een ControlArray unoaden. (zie onder)
De vraag:
Is er een manier om te detecteren of een van die events op het moment afgehandeld wordt?
Even een voorbeeld, want dit was wel erg compact geformuleerd:
Ik heb een Sub die controls unload.
Die Sub kan aangeroepen worden vanuit allerlei plekken in mijn script, waaronder een ComboBox_Click event (Dat mag dus niet).
Kan ik nu in mijn sub detecteren of er een ComboBox_Click event afgehandeld wordt, zodat ik een fout kan voorkomen?
Met een gefundeerd "nee" ben ik ook blij.
Wilde_Bill
'--------------hier de gevallen waarin je niet mag unloaden---------------------------
In some situations you are not allowed to unload a form or a control on a form. This error has the following causes and solutions:
There is an Unload statement in the Paint event for the form or for a control on the form that has the Paint event.
Remove the Unload statement from the Paint event.
There is an Unload statement in the Change, Click, or DropDown events of a ComboBox.
Remove the Unload statement from the event.
There is an Unload statement in the Scroll event of an HScrollBar or VScrollBar control.
Remove the Unload statement from the event.
There is an Unload statement in the Resize event of a Data, Form, MDIForm, or PictureBox control.
Remove the Unload statement from the event.
There is an Unload statement in the Resize event of an MDIForm that is trying to unload an MDI child form.
Remove the Unload statement from the event.
There is an Unload statement in the RePosition or Validate event of a Data control.
Remove the Unload statement from the event.
There is an Unload statement in the ObjectMove event of an OLE Container control.
Remove the Unload statement from the event.
'--------------------------------------