高分求web页面传参数给ActiveForm得完整例子!

jxk 2003-04-16 04:02:49
发到我得邮箱:jiangxk@sina.com
多谢!
...全文
37 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jxk 2003-04-17
  • 打赏
  • 举报
回复
多谢我最后用的是这种方法
我在Borland新闻组中找到如何使ActiveForm获取网页中参数的方法:

Hmmm. I followed an example from one of these newsgroups and got it w

orking

without a hitch. Did you declare support for IPersistPropertyBag in t

he

class definition?

Here is what mine looks like, with non-essentials removed:

class TMyActiveForm = class(TActiveForm, IMyActiveForm,

IPersistPropertyBag)

protected:

// IPersistPropertyBag

function IPersistPropertyBag.GetClassID = PersistPropertyBagGetCla

ssID;

function IPersistPropertyBag.InitNew = PersistPropertyBagInitNew;

function IPersistPropertyBag.Load = PersistPropertyBagLoad;

function IPersistPropertyBag.Save = PersistPropertyBagSave;

function PersistPropertyBagInitNew: HResult; stdcall;

function PersistPropertyBagGetClassID(out classID: TCLSID): HResul

t;

stdcall;

function PersistPropertyBagLoad(const pPropBag: IPropertyBag; cons

t

pErrorLog: IErrorLog): HResult; stdcall;

function PersistPropertyBagSave(const pPropBag: IPropertyBag;

fClearDirty: BOOL; fSaveAllProperties: BOOL): HResult; stdcall;

end;

implementation

(*

* IPersistPropertyBag

*)

function TMyActiveForm.PersistPropertyBagLoad(const pPropBag: IPropert

yBag;

const pErrorLog: IErrorLog): HResult;

var

v : OleVariant;

begin

if pPropBag.Read('ShowLegend', v, pErrorLog) = S_OK then

Set_ShowLegend( v );

if pPropBag.Read('XMLDSOID', v, pErrorLog) = S_OK then

Set_XMLDSOID( v );

result := S_OK;

end;

function TMyActiveForm..PersistPropertyBagSave(const pPropBag: IProper

tyBag;

fClearDirty, fSaveAllProperties: BOOL): HResult;

var

v : OleVariant;

begin

v := FShowLegend;

pPropBag.Write( 'ShowLegend', v );

v := FXMLDSOID;

pPropBag.Write( 'XMLDSOID', v );

result := S_OK;

end;

function TMyActiveForm..PersistPropertyBagGetClassID( out classID: TCL

SID):

HResult;

begin

try

classID := Class_MyActiveForm;

Result := S_OK;

except

end;

end;

function TMyActiveForm.PersistPropertyBagInitNew: HResult;

begin

try

result := S_OK;

except

end;

end;

jxk 2003-04-16
  • 打赏
  • 举报
回复
多谢你了
lvloj 2003-04-16
  • 打赏
  • 举报
回复
kyo1979 (绝望的生鱼片) :
我觉得我在http://expert.csdn.net/Expert/topic/1668/1668487.xml?temp=.9279901里已经说得很清楚了.算了,还是发个完整的给你好了.
jxk 2003-04-16
  • 打赏
  • 举报
回复
你说得方法好像是在cgi里面得
你可以看看这个帖子,跟这个帖子有关系
http://expert.csdn.net/Expert/topic/1668/1668487.xml?temp=.9279901
曦-85 2003-04-16
  • 打赏
  • 举报
回复
可用value:=request.Form.Item['name'];获得参数

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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