# Tmenudrawitemevent

**URL:** https://talk.remobjects.com/t/tmenudrawitemevent/6471
**Category:** Pascal Script
**Created:** [July 1, 2015, 2:24am UTC](https://talk.remobjects.com/t/tmenudrawitemevent/6471 "2015-07-01T02:24:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ken\_davis](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/k/ea5d25/32.png) [@ken\_davis](https://talk.remobjects.com/u/ken_davis)
#### Post date: [July 1, 2015, 2:24am UTC](https://talk.remobjects.com/t/tmenudrawitemevent/6471/1 "2015-07-01T02:24:58Z")

</div>

After I add :  
FMPlugin := TPSImport\_Forms.create(nil);  
TPSPluginItem(TC.ps.Plugins.add).Plugin := FMPlugin;

and attempt to execute a script, I get the error:  
‘Unable to register type TMENUDRAWITEMEVENT’ ?

What is the problem? Have I left something out? I don’t seem to have a problem with any other Plugins.

Thanks,  
Ken Davis

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [July 1, 2015, 6:35am UTC](https://talk.remobjects.com/t/tmenudrawitemevent/6471/2 "2015-07-01T06:35:34Z")

</div>

Probably whatever TMENUDRAWITEMEVENT depends on isn’t properly registered. Forms requires all other plugins to be registered first.

---

<div class="post-metadata">

### Author: ![ken\_davis](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/k/ea5d25/32.png) [@ken\_davis](https://talk.remobjects.com/u/ken_davis)
#### Post date: [July 1, 2015, 11:24pm UTC](https://talk.remobjects.com/t/tmenudrawitemevent/6471/3 "2015-07-01T23:24:41Z")

</div>

Thank you, that got rid of my error.  
However, when I create a form from my script, then call Form.show, my application hangs?  
1.\> In what order should the Plugins be registered?  
2.\> Is there anything else I need to do to allow me to create a form?  
3.\> Do I need to assign any events, to allow my program to continue to run?  
If not any of the above, is there anything that you can think of that will help me out?  
Thanks,  
Ken Davis

---

<div class="post-metadata">

### Author: ![ck](https://talk.remobjects.com/user_avatar/talk.remobjects.com/ck/32/8740_2.png) [@ck](https://talk.remobjects.com/u/ck)
#### Post date: [July 8, 2015, 6:33am UTC](https://talk.remobjects.com/t/tmenudrawitemevent/6471/4 "2015-07-08T06:33:10Z")

</div>

I can’t really think of anything that causes hangs, easiest way to find out is to press pause in the IDE and see where it is.
