几何尺寸与公差论坛

 找回密码
 注册
查看: 625|回复: 0

【转帖】can not declare a variable as a form

[复制链接]
发表于 2009-4-13 09:30:43 | 显示全部楼层 |阅读模式
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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-24 03:25 , Processed in 0.036581 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表