1,文件
a. 增加
VFP_GDIPlus.msm - 可能是 VFP 9.0 版的 GDIPlus
b. 变化
vfp8r.dll - 4,200K
vfp9r.dll - 4,493K
V9 比 V8 增大了 300(-)K,表示 V9 没有像人们预计的那样会减肥;
vfp8rchs.dll - 1,124K
vfp9rchs.dll - 1,160K
猜想增加了某些特种字型/字库;
foxtools.fll - V8 = 38K,V9 = 52K
增加了常用的适合 VFP 的 Windows API 函数;
而更多的 Windows API 函数已经嵌入在 VFP 系统中,比如:
FLUSH [[IN nWorkArea | cTableAlias] | [cFileSpec]] [FORCE]
[FORCE] 子句就是调用 Windows API FlushFileBuffers 函数;
2,限制
a. 表的记录数极限无变化 - 10亿条
b. 表/备注的大小极限无变化 - 2GB
也没有像人们预计的那样会增大;
c. 报表的带区容量有变化:
VFP 8.0 :
Maximum # of grouping levels - 128
VFP 9.0 :
Maximum # of data grouping levels - 74
Maximum # of Detail bands - 20
即:74x20=1480
3,命令
FLUSH [[IN nWorkArea | cTableAlias] | [cFileSpec]] [FORCE]
4,函数
ICASE( ) - 立即 Do Case...EndCase
*|* 以前是下面结构:
Do Case
Case 1 + 1 = 2
? "First is true"
Case 1 + 1 = 3
? "Second is false"
Otherwise
? "None are true"
Endcase
*|* 现在可以用一句替代:
? Icase(1 + 1 = 2, "First is true", 1 + 1 = 3, "Second is false", "None are true")
5,SET ENGINEBEHAVIOR 70 | 80 | 90 - 几种 VFP 9.0 SQL Select 行为:
不能对 Memo 或 General 字段加 DISTINCT 子句,
不能对 Memo 字段加 UNION 子句,
Like 的变化,看下面一段子例:
Clear
Create Cursor Table1 (Fname1 C(3))
Insert Into Table1 (Fname1) values ('1')
Insert Into Table1 (Fname1) values ('12')
Insert Into Table1 (Fname1) values ('123')
Select * From table1 Where Fname1 Like "1__"
VFP 7.0 返回 (SET ENGINEBEHAVIOR 70):
123
VFP 8.0/9.0 返回 (SET ENGINEBEHAVIOR 90):
1
12
123
6,在 Class Browser 中可以打开一个基于 Program File (.prg) 的类库文件,
就是说,可以把一个基于 .Prg 的文件转换成一个对应的 .Vcx 类库文件;
7,表单
a. 表单的 Label / Line / Sharp 控件增加 Rotation (旋转) 属性,(0 - 360 度),
而且可以画出复杂的形状,如:
*|* Lebal 旋转 Sample1
frmMyForm = Createobject('Form')
frmMyForm.AddObject('lblLabel1','lblMyLabel')
frmMyForm.AddObject('cmdCmndBtn1','cmdMyCmndBtn1')
frmMyForm.AddObject('cmdCmndBtn2','cmdMyCmndBtn2')
frmMyForm.lblLabel1.Visible = .T.
frmMyForm.cmdCmndBtn1.Visible =.T.
frmMyForm.cmdCmndBtn2.Visible =.T.
frmMyForm.Show
Read Events
Define Class lblMyLabel As Label
Caption = "MyLabel"
Left = 150
Top = 50
Height = 50
Width = 50
Enddefine
*|*
Define Class cmdMyCmndBtn1 As CommandButton
Caption = '\<ROTATE'
Left = 125
Top = 150
Height = 25
Procedure Click
Thisform.lblLabel1.Visible = .F.
Thisform.lblLabel1.Rotation = Thisform.lblLabel1.Rotation + 45
If Thisform.lblLabel1.Rotation = 360
Thisform.lblLabel1.Rotation = 0
Endif
Thisform.lblLabel1.Visible = .T.
Enddefine
*|*
Define Class cmdMyCmndBtn2 As CommandButton
Caption = '\<QUIT'
Cancel = .T.
Left = 125
Top = 200
Height = 25
Procedure Click
Clear Events
Enddefine
*!* 非规则几何线 Sample2
Dimension Poly[5,2]
Poly[1,1]= 0
Poly[1,2]= 50
Poly[2,1]= 50
Poly[2,2]= 100
Poly[3,1]= 100
Poly[3,2]= 50
Poly[4,1]= 50
Poly[4,2]= 0
Poly[5,1]= 0
Poly[5,2]= 50
*!*
frmMyForm = Createobject('Form')
frmMyForm.AddObject('shpLine','Line')
frmMyForm.AddObject('cmdCmndBtn1','cmdMyCmndBtn1')
frmMyForm.shpLine.Top = 20
frmMyForm.shpLine.Left = 125
*!*
frmMyForm.shpLine.Polypoints = "poly"
*!*
frmMyForm.shpLine.Visible = .T.
frmMyForm.cmdCmndBtn1.Visible =.T.
*!*
frmMyForm.Show
Read Events
*!*
Define Class cmdMyCmndBtn1 As CommandButton
Caption = '\<QUIT'
Cancel = .T.
Left = 125
Top = 150
Height = 25
Procedure Click
Clear Events
Enddefine
*|* 隐藏 ListBox 的滚动条 Sample3:
Clear
Dimension gaMyListArray(10)
For gnCount = 1 To 10
Store Replicate(Chr(gnCount+64),6) To gaMyListArray(gnCount)
Next
*|*
frmMyForm = Createobject('Form')
frmMyForm.AddObject('cmbCommand1','cmdMyCmdBtn')
frmMyForm.AddObject('lstListBox1','lstMyListBox')
frmMyForm.lstListBox1.RowSourceType = 5
frmMyForm.lstListBox1.RowSource = 'gaMyListArray'
frmMyForm.cmbCommand1.Visible =.T.
frmMyForm.lstListBox1.Visible =.T.
frmMyForm.Show
Read Events
Define Class cmdMyCmdBtn As CommandButton
Caption = '\<QUIT'
Cancel = .T.
Left = 125
Top = 210
Height = 25
Procedure Click
Clear Events
Clear
Enddefine
Define Class lstMyListBox As ListBox
Left = 10
Top = 30
AutoHideScrollbar = 2
Enddefine
b.表单支持:
0 - Form does not support docking. (Default)
1 - Form supports docking and is dockable.
2 - Form supports docking but is not dockable.
8,支持 UTF-8 代码页 (Specify Code Pages)
包括:
Native
Open Database Connectivity (ODBC)
ActiveX Data Object (ADO)
Extensible Markup Language (XML)
但主要是对 XML 而言的增强;
未完待续......
9,表单的属性表增加了[收藏夹] - Favourites tab on the Properties
在表单的属性表上,右击鼠标,把最常用的属性放在 [收藏夹] 里;
10,索引文件增加了 Binary 类型,速度要比现在快约 30 倍;
11,八哥 (Bug)
a.下例程序出现 C5 Bug:
Create Cursor crsrFontList (cFont Char(30))
llGotFonts = Afont(laFonts)
For i = 1 To Alen(laFonts)
Insert Into crsrFontList values (laFonts(i))
Endfor
Create Report fontList From Dbf("crsrFontList")
loListen = Createobject("myFontListener")
Report Form fontList Preview Object loListen
Define Class myFontListener As ReportListener
ListenerType = 1
Procedure EvaluateContents
Lparameters nFrxRecno, oObjProperties
oObjProperties.FontName = cFont
oObjProperties.Reload = .T.
Endproc
Enddefine
b.打开 Help 文件,在 Error Messages by Number -> 不能 [Jump to this number:]
即没有超连接,VFP 8.0 可以;
c.在中文 Windows 98 SE 下,Help 文件有很多乱码;
d.表单的属性表有白板 (Properties of Form Is Blank) - (IDE)
打开一个 Form -> 出现 Properties Window,
再打开一个
,
然后把 [Code References Window] 拉进 [Properties Window],
使得两个窗口重叠,出现白板,
而在 VFP 8.0 中,是把两个窗口组成一个 Tab 表;
e.Label/Lines 可以旋转,但 Shapes 好象不能旋转;
f.VFP 9B 支持对数组类型的判别,
Dimension aMyArray[10]
? Type("aMyArray")
Return 是 'L'
应该返回值或 ‘U' (未定义),或 'A',返回值是 'L' 好象说不通;
12,安装问题
a.VFP 9B 可以在 Win98se 下正确安装和使用;
b.MS Web 提供的 isx5foxpro.exe / VFP9BETA.exe / VFP9RELNOTES.EXE 三个文件,
其实只要 VFP9BETA.exe 即可,VFP9RELNOTES.EXE 文件是[自述 / Readme]文件,
isx5foxpro.exe 表示:InstallShieldExpress V5 For FoxPro 专用版,不需要;
13,新增函数 CAST( )
这是一种数据类型进行转换的函数,
比如:Data\Testdata.dbc 中 Product_ID 字段是 C/6,它可以参加聚合运算:
Open Database Home(2) + 'Data\Testdata.dbc'
Select Product_ID, Cast(unit_Cost * in_Stock As N(8,2)) From Products
未完待续......
以下是 VFP 9.0 Beta 版 Help 中没有公开的文档,
资料来自于 VFP9 Beta Release Notes:
10,IsTransactable() / MakeTransactable() - 对自由表/游标判别/执行交易
Create Cursor Table1 (C1 c(10))
? Reccount() && Returns 0
Append Blank && 增加记录
? IsTransactable() && 判别是否可交易,Returns .F.,因为 MakeTransactable() 没有启动
? Reccount() && Returns 1
*|*
? MakeTransactable() && 对自由表/游标执行交易,Returns .T.
Begin Transaction && 交易
Append Blank
Append Blank
? Reccount() && Returns 3
Rollback && 回滚,恢复到 MakeTransactable() 前
? IsTransactable() && 判别是否可交易,Returns .T.,因为 MakeTransactable() 已经启动
? Reccount() && Returns 1
11,SYS( 1104 [, cAlias | nWorkArea] )
增加了第二个参数,可以指定非当前工作区,主要是清理内存/缓冲时可以不移动记录指针;
13,GetAutoincvalue() - 返回一个自增量字段的最大值;
14,Set TablePrompt On |Off - 打开/关闭一个 Open 对话窗口,
当 Set TablePrompt On (缺省) 时,如果当前工作区没有打开表,
如果此时发布 Zap 等命令,系统会自动打开一个 Open 对话窗口,
当 Set TablePrompt Off 时,就只出现一个错误提示窗口;
15,Set VarcharMapping On|Off - 主要是对可变字段 (Varchar) 进行 SQL Select 操作时,是否压缩;
16,STRCONV( ) 增加了第三个参数:
语法:STRCONV(cExpression, nConversionSetting ;
[, nRegionalIdentifier [,nRegionalIDType]])
nRegionalIdentifier – 可以是 LocaleID, Code Page 或 FontCharSet
17,Agetclass() 函数可以在 Runtime 中支持;
18,_SCREEN.DisplayOrientation = nvalue
增加了对 Tablet PC 开发的屏幕定位,可能是 Tablet PC 的 SDK;
19,DataExplorer.App - 把 VFP 的表/数据库移植或升迁到 SQL Server 上的转换程序,
它是模仿 Visual Studio Server Explorer,该程序还在开发中,问题很多;
20,VFP9 Solution samples 还未发布;
21,设计时 (Design-Time) 的中文 (简/繁体)、韩文资源文件 (VFP8KOR.DLL,
VFP9CHS.DLL 和 VFP9CHT.DLL) 尚未完成,但运行时刻 (Runtime) 资源文
件应该没有问题;
22,_SCREEN.AppState 属性将在 VFP 9.0 正式版发布;
未完待续......
23,基于对象的部分提速不明显:
#Define TestMax 10000
Dimension X(TestMax)
nStart = Seconds()
For I = 1 To TestMax
X(I) = Createobject("RELATION")
Endfor
For I = 1 To TestMax
X(I) = ""
Endfor
Release X
? Seconds() - nStart
VFP 8/9 测试结果约 0.7 秒,差不多;
24,Modify Report 没有像之前宣称的 (Europa Preview) 那样可以带 Protected 参数/子句;
25,FFC 基类增加了:FrxCursor / ReportListener
26,VFP 9.0 增加的属性:
Anchor
Appstate
AutoHideScrollBar
Autocomplete
DisplayOrientation
Dockable
GetDockState
OrderDirection
PictureMargin
PictureSpacing
PictureVal
PolyPoints
27,VFP 9.0 增加的函数:
Asqlhandles( )
Cast( )
ClearResultset( )
GetAutoincvalue( )
GetResultset( )
Icase( )
IsMemoFetched( )
Ispen( )
IsTransactable( )
MakeTransactable( )
Setresultset( )
SQLIdleDisconnect( )
Sys(3092) - Record Sys(3054) Output To a File.
28,VFP 9.0 增强的函数:
Adockstate( )
Agetclass( )
Alltrim( ) - 支持 Varbinary 类型
Aused( )
CursorGetProp( )
CursorSetProp( )
Cursortoxml( )
DBGetProp( )
DBSetProp( )
Ltrim( ) - 支持 Binary 类型
Newobject( )
Rtrim( ) - 支持 Binary 类型
Set( )
SQLGetprop( )
SQLSetprop( )
Strconv( )
Trim( ) - 支持 Binary 类型
Ttoc( ) - 参数 3 : 返回 XML DateTime 格式
Type( ) - 增加 Q : Blob, Varbinary
Xmltocursor( ) - nFlags 到 32768
Sys(1104) - Purge Memory Cache
Sys(3056) - Read Registry Settings
MakeTransactable( )
29,说法不一
微软网站上说 : Visual FoxPro 9.0 Beta 有效期至 2005.03.31 (March 31, 2005)
该 Beta 版只能运行在 Win2K + SP2 / Windows Server 2003, Windows XP
而 VFP 9B Readme.Htm 上说是必须在 : Win2K + SP3 / Windows Server 2003, Windows XP