|
|
发表于 15-3-2005 04:22 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 15-3-2005 09:58 PM
|
显示全部楼层
邏輯的問題, 只要的有排列的邏輯, 就有正確答案
tstan 你的排列邏輯是什麼?你明白 alltrim 及 substr 的用法嗎?
[ Last edited by GoodMorning on 15-3-2005 at 10:00 PM ] |
|
|
|
|
|
|
|
|
|
|
发表于 16-3-2005 08:52 AM
|
显示全部楼层
tstan135 的排列法有几点出错
1. index on / sort on 不可以使用长度变动的函数如 AllTrim(),Trim(),LTrim(),RTrim()
2. 不熟悉 substr() 语法
substr('1 ',5) = ' ' <- 出错的地方
substr('14PQ+R',5) = 'R'
3. 没使用任何函数的排列法
|
|
|
|
|
|
|
|
|
|
|
发表于 16-3-2005 11:01 AM
|
显示全部楼层
感谢各位前辈的指点。
以上的例子方法只不过试试 enry98 所提供的方法。
是不是也就是说 foxpro 并不能把资料 sort 成 excel 那样? |
|
|
|
|
|
|
|
|
|
|
发表于 16-3-2005 11:26 AM
|
显示全部楼层
tstan135 于 16-3-2005 11:01 AM 说 :
感谢各位前辈的指点。
以上的例子方法只不过试试 enry98 所提供的方法。
是不是也就是说 foxpro 并不能把资料 sort 成 excel 那样?
剛查証你之前的例子
幫你找到的原因
在 excel 中,
1,2 可以有兩種方式
其一 數字型態 1,2
其二 字串型態 '1,'2
數字型態與字串型態在 excel 中 排列, excel 會先排數字型態, 才排字串型態 |
|
|
|
|
|
|
|
|
|
|
发表于 17-3-2005 01:14 AM
|
显示全部楼层
GoodMorning 于 16-3-2005 11:26 AM 说 :
剛查証你之前的例子
幫你找到的原因
在 excel 中,
1,2 可以有兩種方式
其一 數字型態 1,2
其二 字串型態 '1,'2
數字型態與字串型態在 excel 中 排列, excel 會先排數字型態, 才排字串型態
foxpro 可否也可以先排数字形态,才排字串形态呢? |
|
|
|
|
|
|
|
|
|
|
发表于 17-3-2005 08:46 AM
|
显示全部楼层
Let's say number 是 numeric field
数字形态的索引
index on number to number
字串形态的索引
index on str(number,10,2) to number |
|
|
|
|
|
|
|
|
|
|
发表于 17-3-2005 12:58 PM
|
显示全部楼层
|
可是如果 field 是 character 的话。。。。 |
|
|
|
|
|
|
|
|
|
|
发表于 21-3-2005 08:46 AM
|
显示全部楼层
tstan135 于 14-3-2005 12:06 PM 说 :

当我的 table set filter 后就会有 error。
scatter from tasd
skip
if eof()
append blank
endif
gather from tasd |
|
|
|
|
|
|
|
|
|
|
发表于 21-3-2005 08:48 AM
|
显示全部楼层
tstan135 于 5-3-2005 12:12 PM 说 :
可以了!
要是说想要当它 got focus 时,我按 down 键时就自动列出里面的资料,应该在 keypree 里怎样写?
if nKeycode = 24
thisform.combo1.?????
endif
在 Combo1.KeyPress 的 Event 里
If nKeyCode = 24
Thisform.Combo1.DropDown
EndIf
[ Last edited by 白日梦 on 21-3-2005 at 08:50 AM ] |
|
|
|
|
|
|
|
|
|
|
发表于 31-3-2005 09:56 AM
|
显示全部楼层
白日梦 于 21-3-2005 08:48 AM 说 :
在 Combo1.KeyPress 的 Event 里
If nKeyCode = 24
Thisform.Combo1.DropDown
EndIf
[ Last edited by 白日梦 on 21-3-2005 at 08:50 AM ]
请问combo需要做什么setting吗?因为以上的command并没有作用。 |
|
|
|
|
|
|
|
|
|
|
发表于 31-3-2005 11:12 AM
|
显示全部楼层
试下这个 F2 function key,我通常使用的
.gotfocus
- On Key Label F2 Keyboard '{ALT+DNARROW}'
复制代码
.lossfocus
|
|
|
|
|
|
|
|
|
|
|
发表于 31-3-2005 05:08 PM
|
显示全部楼层
白日梦 于 31-3-2005 11:12 AM 说 :
试下这个 F2 function key,我通常使用的
.gotfocus
- On Key Label F2 Keyboard '{ALT+DNARROW}'
复制代码
.lossfocus
刚刚发现,function key 'F4' 也有此功能。 |
|
|
|
|
|
|
|
|
|
|
发表于 1-4-2005 08:56 AM
|
显示全部楼层
我在 help 里 shortcut key 讲的 Alt + Down Arrow
F4 = Flower 4 
是哦!F4 也行。
我常设定删除记录用,因为 4 = 死 |
|
|
|
|
|
|
|
|
|
|
发表于 1-4-2005 05:17 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 4-4-2005 09:24 AM
|
显示全部楼层
使用 Timer 的物件。
Timer.interval = 1000
' 1000 = 1秒
' 60000 = 1分钟
' 3600000 = 1小时
'86400000 = 1天
Timer.Timer 里编入程序
例如
_Screen.Caption = 'Today is '+dtoc(date())+' Now is '+Time()
这样每一秒就把 VFP 的 Title Bar 更新时间。
还有,别忘记 Timer.Init 编程
This.Timer |
|
|
|
|
|
|
|
|
|
|
发表于 4-4-2005 10:10 AM
|
显示全部楼层
白日梦 于 4-4-2005 09:24 AM 说 :
使用 Timer 的物件。
Timer.interval = 1000
' 1000 = 1秒
' 60000 = 1分钟
' 3600000 = 1小时
'86400000 = 1天
Timer.Timer 里编入程序
例如
_Screen.Caption = 'Today is '+dtoc(date())+' No ...
谢谢!
请问如果是要计算秒数的程序,应该怎样改? |
|
|
|
|
|
|
|
|
|
|
发表于 4-4-2005 02:41 PM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
发表于 5-4-2005 12:50 AM
|
显示全部楼层
白日梦 于 4-4-2005 02:41 PM 说 :
你问的是 Stop Watch ?
是的。 |
|
|
|
|
|
|
|
|
|
|
发表于 5-4-2005 09:20 AM
|
显示全部楼层
请参考狐狸精的编程示范
C:\Program files\Microsoft Visual FoxPro 8\Samples\Solution\Controls\Timer\swatch.scx |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|