在开发activex dll过程中如何使用For Each

MOODSKY2002 2008-05-27 11:27:32
在开发activex dll时一使用for each生成出的dll在调用该部份时会提示"未设置对像变量或with block变量"
该怎么办呢....
...全文
45 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yinweihong 2008-05-27
  • 打赏
  • 举报
回复
楼主没描述清楚问题,你是要某个对象支持for each枚举

还是?

"未设置对像变量或with block变量" 这个错很多时候都抱
MOODSKY2002 2008-05-27
  • 打赏
  • 举报
回复
晕。。。。结果是我自己有个类型忘了声明就直接引用了。。。。。真是让人吐血
=================================================== AddFlow ActiveX control Version 4.2.0.26Copyright (c) 1997-2004 Lassalle Technologies. All rights reserved.http://www.lassalle.com===================================================Last updated: august 14, 2004Note: the purpose of this readme file is just to give the description of this package. See the file history.txtto know the last improvements.PACKAGE DESCRIPTIONThis package is a full installation package of the AddFlow ActiveX control, version 4.2. The installation program has been created with InstallShield for Microsoft Visual C++ 6.It installs: - ADDFLOW4.OCX: It is placed in the Windows system directory. - ADDFLOW4.CHM: the AddFlow help file - PRNFLOW3.OCX: the PrnFlow ActiveX control, version 3.0.0.2 It is an extension of AddFlow, allowing to print diagrams. It is placed in the Windows system directory. - PRNFLOW3.HLP: the PrnFlow help file - 3 Microsoft shared DLLs: MFC42.DLL, MSVCRT.DLL, OLEPRO32.DLL There are placed in the Windows system directory. - README.TXT (this current text file) - HISTORY.TXT (a description of each new version enhancements) - 6 VB6 SAMPLES * VBAF4EDIT It is a small diagram editor illustrating how to use the Undo/Redo feature and how to easily change the node and link properties by right clicking on them. * NAVIG It demonstrates how to use collections to navigate in a diagram. * POINT It allows working with the collection of the link points and with the following properties: ExtraPoints, AdjustOrg, AdjustDst, LinkStyle and OrthogonalDynamic. * PICTURES It shows how to use the Pictures and PictureIndex properties. * TABLES This VB6 sample demonstrates how to use AddFlow to create database diagrams. * XMLFLOW An ActiveX DLL allowing to save/load an AddFlow diagram in a XML file. - 2 VC6 SAMPLES * NAVIG VC6 sample: the same program as the NAVIG VB6 sample except that it is written in C++. * VCAF4EDIT VC6 sample: a MDI diagram editor written in C++. It displays 4 examples of diagrams created programmaticaly. - 3 DELPHI 5 SAMPLES * Editor: a small diagram editor * Navig: same as the VB6 and VC6 versions. * Demo: displays 4 examples of diagrams created programmaticaly. ------------------------------------------------------------------------------TRADEMARKS:* AddFlow and PrnFlow are registered trademarks of Lassalle Technologies.* InstallShield is a registered trademark of InstallShield Corporation.All other names and trademarks are property of their respective companies.------------------------------------------------------------------------------
ControlWizard has created this project for your MYVOIP ActiveX Control DLL, which contains 1 control. This skeleton project not only demonstrates the basics of writing an ActiveX Control, but is also a starting point for writing the specific features of your control. This file contains a summary of what you will find in each of the files that make up your MYVOIP ActiveX Control DLL. myvoip.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. myvoip.h This is the main include file for the ActiveX Control DLL. It includes other project-specific includes such as resource.h. myvoip.cpp This is the main source file that contains code for DLL initialization, termination and other bookkeeping. myvoip.rc This is a listing of the Microsoft Windows resources that the project uses. This file can be directly edited with the Visual C++ resource editor. myvoip.def This file contains information about the ActiveX Control DLL that must be provided to run with Microsoft Windows. myvoip.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to generate and edit message maps and dialog data maps and to generate prototype member functions. myvoip.odl This file contains the Object Description Language source code for the type library of your control.
来自Software Artisans,SA-FileUP组件是一个真正的ActiveX DLL服务器组件,容易集成到ASP网页。该组件也可在MTS/COM+的环境上运行。 使用SA-FileUP组件的教程可在http://www.activeserverpages.com/upload/ 上找到 建立SA FileUp 对象的方法: Set oFileUp = Server.CreateObject("SoftArtisans.FileUp") 取出表单所有项的方法: For Each strFormElement In oFileUp.Form 用 oFileUp.Form(strFormElement)就可以引用每个对象,文件也是这样 注意:如果是多选下拉框,则用oFileUp.FormEx(strFormElement) 可以这样来遍历它。 For Each strSubItem In oFileUp.FormEx(strFormElement) Response.Write( strSubItem & "") Next Next ContentType属性: oFileUp.Form(strFormElement).ContentType 可以得到文件的MIME类型 IsEmpty属性 oFileUp.Form(strFormElement).IsEmpty 可以知道用户是不是指定了一个无效的文件 MaxBytes属性 oFileUp.Form(strFormElement).MaxBytes=30000 指定文件的限制,单位为Byte,如果超过它,那么只存储MaxBytes指定的大小。其余舍弃。 ServerName属性 oFileUp.Form(strFormElement).ServerName 可以得到文件保存到服务器的完整路径。 ShortFilename属性 oFileUp.Form(strFormElement).ShortFilename 可以得到客户端的文件名,注意只是文件名,我这里没有用,因为报错。呵呵。 UserFilename属性 oFileUp.Form(strFormElement).UserFileName 可以得到客户端文件的完整路径。可以输出一下给用户看看。 TotalBytes属性 oFileUp.Form(strFormElement).TotalBytes 可以得到文件的大小,单位为Byte SaveInVirtual(路径)方法 oFileUp.Form(strFormElement).SaveInVirtual "upfile/" oFileUp.Form(strFormElement).SaveInVirtual "upfile/aa.abc" 如果只指定了路径,则保留原文件名,否则按指定指定文件名保存 服务器管理员可以禁止掉其他所有方法,但这个一定会留的。 SaveAs (文件名)方法 oFileUp.Form(strFormElement).SaveAs "C:\aa\a.tmp" 如果没有指定路径,只是指定了文件名,那么将用Path属性指定的路径。 Path属性一会介绍。 Save方法 oFileUp.Path="D:\\wwwroot\\abc\\upfile\\" 注意必须是真实路径,可以用Server.MapPath来转换虚拟路径。 oFileUp.Form(strFormElement).Save 不能指定文件名喽。 注意:Path属性必须在提到任何表单项之前,建议放在 Set oFileUp = Server.CreateObject("SoftArtisans.FileUp") 的后面。前提是你用的话。 Delete (文件名,可选) oFileUp.Form(strFormElement).Delete 从服务器上删除文件,如果不指定文件名,则删除当前的文件。 如果指定的话,必须是文件的完整路径。 Flush方法 oFileUp.Flush 当你不想保存任何东西的时候,可以用它来放弃全部的输入流。

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧