如何在FOXPRO表单中加入ACTIVE X 控件???

qinjianhui 2003-04-02 05:41:32
如何在FOXPRO表单中加入ACTIVE X 控件及如何建立超链接。而要了解哪几个属性???请指教???
...全文
72 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
流星尔 2003-04-03
  • 打赏
  • 举报
回复
手工加入,工具选项,控件下选ACTIVE控件
zhongyj 2003-04-03
  • 打赏
  • 举报
回复
PUBLIC frmMyForm, cFilename
SET SAFETY OFF
* Declare variables and initialize.

frmMyForm = CREATEOBJECT("form")
frmMyForm.Width = 100
frmMyForm.ADDOBJECT("oleOutl","myoutline")
DIMENSION aSection(3)
aSection(1) = "Table"
aSection(2) = "Field"
aSection(3) = "Index"
* Create a form, add the custom outline control to the form, and then create an array for the items that the control lists.

cFilename = GETFILE("dbc","Select a DBC")
USE (cFilename)
INDEX ON objecttype FOR (objecttype = "Table" ;
OR objecttype = "Field" ;
OR objecttype = "Index" ) ;
TAG fname
* Prompt for a database that contains the information you want the control to list.

FOR nIndex = 1 TO 3 STEP 1
frmMyForm.oleOutl.AddItem(aSection(nIndex))
frmMyForm.oleOutl.Indent;
((frmMyForm.oleOutl.ListCount-1)) = 1
SCAN
IF objecttype = aSection(nIndex)
frmMyForm.oleOutl.Additem(objectname)
frmMyForm.oleOutl.Indent;
((frmMyForm.oleOutl.ListCount-1)) = 2
ENDIF
ENDSCAN
GO TOP
ENDFOR
* Gather information from the database, and then add it to the control.

frmMyForm.oleOutl.Visible = .T.
frmMyForm.Show
* Make the control visible, and then display the form.

DEFINE CLASS myoutline AS olecontrol
OleClass = "msoutl.outline"
Top = 5
Left = 5
Height = 10
Width = 60
ENDDEFINE
* Define a subclass of the OLE Container control and add the outline control by setting the OleClass property of the container, and then defining other custom settings.
或在form設計器中手工加入

vfp里有超链接的例子
C:\Program Files\Microsoft Visual Studio\MSDN98\98VS\1033\Samples\VFP98\Solution\
Solution.app

2,718

社区成员

发帖
与我相关
我的任务
社区描述
VFP,是Microsoft公司推出的数据库开发软件,用它来开发数据库,既简单又方便。
社区管理员
  • VFP社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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