VFP DLL解决思路

VFP DLL
Define   Class   testx   as   Custom   olepublic
Procedure   go
Define   Pad   test   of   _msysmenu   prompt   "test "     color   scheme   3
On   Pad   test   of   _msysmenu   activate   popup   p_test
Define   Popup   p_test     margin     relative   shadow   color   scheme   4
Define   Bar   1   of   p_test     prompt   "hello "
On   Selection   Bar   1   of   p_test   do   form   test
endproc
EndDefine  


想将菜单定义放进DLL中,运行时出以下错误:
OLE   IDispatch   exception   code   2031
user-interface   operation   not   allowed   at   this   time.

DLL不能操作UI?

------解决方案--------------------
DLL 中不能做可视化
------解决方案--------------------
可以编成exe com