![]() |
【转帖】can not declare a variable as a form
can not declare a variable as a form
hello .net guru, why .net won't let me type this line in my addin for each newform as form in application.openforms if i set the application type to "windows forms application" then it's ok; however, it doesnt seem to work with "class library" please the att. image thx, chris solidworks 2007 (office pro.) sp5.0 testing solidworks 2009 (pro) sp0.0 dell precision t3400 2 cpu (8500) 3.16 ghz, 3.25 gb of ram window xp pro sp2 nvidia fx 570 6.14.11.6262 edited: 07/30/2008 at 05:06 pm by chris ch class projects do not automatically add the references to system.windows.forms go to the solution explorer (right hand side), and if you are in vb.net make sure you click the second button in first called "show all files" to see the references folder. then right-click the references folder and select add reference... in the .net tab, scroll down and select system.windows.forms and click ok. thanks luke yes, it's included - please see the att. image however, i still got the mesg "type form is not defined" chris solidworks 2007 (office pro.) sp5.0 testing solidworks 2009 (pro) sp0.0 dell precision t3400 2 cpu (8500) 3.16 ghz, 3.25 gb of ram window xp pro sp2 nvidia fx 570 6.14.11.6262 but have you included the imports statement imports system.windows.forms if not just include it or type for each oform as system.windows.forms.form thx, luke got it working now chris solidworks 2007 (office pro.) sp5.0 testing solidworks 2009 (pro) sp0.0 dell precision t3400 2 cpu (8500) 3.16 ghz, 3.25 gb of ram window xp pro sp2 nvidia fx 570 6.14.11.6262 quick |
所有的时间均为北京时间。 现在的时间是 05:42 PM. |