把以下 notepad.exe 换成你的 DOS命令即可
来源:http://bbs.csdn.net/topics/340256503
Declare Long WinExec In kernel32 String,Long
=WinExec("notepad.exe",1)
Clear Dlls
WinExec(one.exe,SW_SHOW);
里面的SW_SHOW意思是什么
WinExec()函数第二个参数是什么意思
如果我想以无参数运行one.exe应该怎么办??
SW_SHOW表示以当前大小激活运行后的程序窗口并显示它。
...
Clear
Date1={^2013.05.12}
Date2={^2013.06.10}
Local AlnDow[7] && 存储星期N的天数
Store 0 To AlnDow
Do While Date1<=Date2
Date1=Date1+1
AlnDow[Dow(date1,2)]=AlnDow[Dow(date1,2)]+1
EndDo
For lnI=1 To 7
? "星期"+Substr("一二三四五六日",lnI*2-1,2)+" "+Transform(AlnDow[lnI])+" 天"
EndFor
Clear
ldDatetime1=DATETIME()
ldDatetime2={^2018-06-15 12:00:00}
lnSeconds=ldDatetime2-ldDatetime1 && 总秒数
lnDays=Int(lnSeconds/86400) && 天数
lnHours=Int(Mod(lnSeconds,86400)/3600) && 小时
lnSecs=Mod(lnSeconds,3600) && 秒
?"距2018年6月15日上午12点整,还有 "+Transform(lnDays)...
类似问题:http://bbs.csdn.net/topics/390633445
编程对Table1表的日期数据处理,把日期段分拆,形成Table2的形式。
Create Table Table1 (cname C(10), date1 D, date2 D)
Insert Into Table1 Values ("Jack", {^1991-3-31}, {^1994-12-15})
Insert Into Table1 Values ("Lily", {^2000-9-10},{^2003-2-15})
Insert Into Tabl...
Local ASZ[50,7]
Store [] To ASZ
For lnI=1 To 50
For lnI1=1 To 7
ASZ[lnI,lnI1]=Padl(lnI*lnI1,4,[0])
Endfor
Endfor
Local cc, oo As Excel.Application
m.oo = Newobject('Excel.Application')
If m.oo.Workbooks.Count < 1
m.oo.Workbooks.Add()
Endif
If m.oo.Workbooks(1)....
VFP6下
?transform(9867.8900)
结果:9867.889999999999
?transform(9867.8900,"@z")
结果:9867.89
VFP9下
?transform(9867.8900,"@z")
结果:9867.89
?transform(9867.100,"@z")
结果:9867.10
结论:使用Transform()函数转换带小数位的数值型数据时,慎用!!!!
建议使用Pad...
? quling(123.00)
? quling(123.100)
? quling(123.010)
function quling
Parameters lenum
lcnum=alltrim(padl(lenum,16," "))
do while right(lcnum,1)="0"
lcnum=left(lcnum,len(lcnum)-1)
enddo
if len(justext(lcnum))=0
lcnum=chrtran(lcnum,".","")
endif
return lcnum
下面一段数据,要求遇到字母时开始换行。如何做到?
B0F0090504210807000220202020024033080000080000180A09021309032909021909021900011000000000ED21080700000000000800000000651056000000000380032000000244000000000000000000000898B4032108070000000000080000010890A887210807090224090224
换行后变成下面
B0F009050421080...
在百度搜索框内打入
site www.meizvfp.com 你要搜索的关键字
* 字符串"A1 A2 A3 A4 A5 A6"转换成"A1,A2,A3,A4,A5,A6"
lcstr="A1 A2 A3 A4 A5 A6"
lcstr=chrtran(lcstr," ",",")
do while ",,"$lcstr
lcstr=strtran(lcstr,",,",",")
enddo
messagebox(lcstr)
问题网址:http://bbs.bccn.net/thread-442165-1-1.html
* 生成测试数据
create cursor tt1 (记录行 i,字段名 c(10),值 i) && 临时表
create cursor tt (a1 i,a2 i,a3 i,a4 i,a5 i,a6 i,a7 i,a8 i,a9 i,a10 i,a11 i)
for lnI=1 to 11
append blank
nzds=0
for lnJ=(lnI-1)*11+1 to lnI*11
nzds=nzds+1
replace...
*一串不重复的数字,并且从小到大排列,如何比较快捷的判断出其中有哪几组数字是连续的,并且取出每组的两头值?
*如:1,3,6,8,9,10,12,15,20,23,24,25,26,30,33,34,35,36,37,38,39,40
*变成:1,3,6,8-10,12,15,20,23-26,30,33-40
Clear
lcStr="1,3,6,8,9,10,12,15,20,23,24,25,26,30,33,34,35,36,37,38,39,40"
nRow=Alines(Astr,Strtran(lcStr,",",Chr(13)+Chr(10)))
l...
* 方法一
cImg = Getpict() && 获取 bmp, jpg, gif
xImgObj = LoadPicture(cImg)
With xImgObj
lnWidth = Int(.Width/26.458)
lnHeight = Int(.Height/26.458)
Endwith
Messagebox("宽度 = " + Transform(lnWidth) + "(像数)" + Chr(13) + ;
"高度 = " + Tran...
x=132
y=Iif(x>26,Chr(64+Ceiling(x/26)-1),"")+Chr(64+Iif(Mod(x,26)=0,26,Mod(x,26)))
MessageBox(y)
例如:
姓名 一月 二月 三月
张三 100 200 300
转置成
姓名 张三
一月 100
二月 200
三月 300
oExcel.Cells(1,1).Resize(2,4).Copy() && 假设要被转置的数据在左上角,2行4列
oExcel.Cells(10,1).PasteSpecial(-4...
clear all
create cursor t3 (学号 c(4),姓名 c(8),课目 c(10),成绩 n(3))
create cursor t1 (学号 c(4),姓名 c(8),数学 n(3),语文 n(3))
insert into t1 values ("1001","张三",102,120)
insert into t1 values ("1002","李四",119,108)
nzds=2
scan
scatter to azd
for lnI=1 to fcount("t1")-nzds
insert into ...
Note 行转列
clear all
create cursor t2 (学号 c(4),姓名 c(8),课目 c(10),成绩 n(3))
insert into t2 values ("1001","张三","数学",102)
insert into t2 values ("1001","张三","语文",120)
insert into t2 values ("1002","李四","数学",119)
insert into t2 values ("1002","李四","语文",108)
select distinct 课目 from t2 into array...
Clear
Clear All
CREATE CURSOR test (数字 N(5,0))
INSERT INTO test values(7)
INSERT INTO test values(88)
INSERT INTO test values(9)
INSERT INTO test values(8)
INSERT INTO test values(103)
INSERT INTO test values(12)
INSERT INTO test values(11)
INSERT INTO test values(102)
INSERT INTO test...
CREATE CURSOR test (数字 N(5,0))
INSERT INTO test values(7)
INSERT INTO test values(88)
INSERT INTO test values(9)
INSERT INTO test values(8)
INSERT INTO test values(103)
INSERT INTO test values(12)
INSERT INTO test values(11)
INSERT INTO test values(102)
INSERT INTO test values(101)
Sort...
clear
x=34567
y=0
do while x!=0
y=x%10+y*10
x=int(x/10)
?y,x
enddo