| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 810 人关注过本帖
标题:老师们请教了!
只看楼主 加入收藏
午丁
Rank: 1
等 级:新手上路
威 望:1
帖 子:71
专家分:0
注 册:2008-3-19
收藏
 问题点数:0 回复次数:3 
老师们请教了!

两个问题请教各位老师高手!
1、如何测试音频文件(或者视频文件)的播放时间?
2、如何知道某表单中都有些什么控件或者对象?或者测试出是不是有容器对象的存在以及它的引用名称?
先谢过!!!
搜索更多相关主题的帖子: 老师 
2008-05-27 12:14
Tiger5392
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:88
帖 子:2775
专家分:2237
注 册:2006-5-17
收藏
得分:0 
2、添加一个命令按钮,其CLICK内容为
create cursor temp (controlid n(4),controlname c(20))
for i=1 to thisform.controlcount
  insert into temp values (i,thisform.controls(i).name)
endfor
brow

感言:学以致用。 博客:http://www./blog/user14/65009/index.shtml email:Tiger5392@
2008-05-28 00:03
午丁
Rank: 1
等 级:新手上路
威 望:1
帖 子:71
专家分:0
注 册:2008-3-19
收藏
得分:0 
很好!
第二题通过,个数第一题还没结果,可以请求各位大师再帮帮?
谢谢!
2008-06-21 20:58
fown
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:58
帖 子:1229
专家分:171
注 册:2005-5-26
收藏
得分:0 
Clear
Local lcMP3File, laMP3Info(5)
Store [] To laMP3Info
lcMP3File = [d:\englishSong\rock dj.mp3]
If GetMP3Info( lcMP3File, @laMP3Info )
    ? [文件: ] + lcMP3File
    ? [歌曲: ] + laMP3Info(1)
    ? [歌手: ] + laMP3Info(2)
    ? [歌集: ] + laMP3Info(3)
    ? [年份: ] + laMP3Info(4)
    ? [备注: ] + laMP3Info(5)
Else
    = MessageBox( [该文件没有包含媒体信息!] )
Endif

Local lcRetuStr, lnMicLength
lcRetuStr = SendMciString( [Open ]+lcMP3File+[ Alias MICTEMP] )
If Left(lcRetuStr,5)=[错误:]
    = MessageBox(lcRetuStr, 0+16+0, [打开媒体文件错误])
Else
    = SendMciString( [Set MICTEMP Time Format MilliSeconds])    && 设置时间格式
    lnMicLength = Val(SendMciString( [Status MICTEMP Length] )) && 取媒体长度
    = SendMciString( [Close MICTEMP] )
    ? [时间: ] + allt(str(lnMicLength))+[ 毫秒]
Endif
Return


Function GetMP3Info ( tcMP3File, taMP3Info )
    External Array taMP3Info
    tcMP3File = iif(Type([tcMP3File])=[C], tcMP3File, [])
    If Type([aLen(taMP3Info,1)])#[N]
        Dime taMP3Info(5)
    Else
        If aLen(taMP3Info,1)#5
            Dime taMP3Info(5)
        Endif
    Endif
    If File(tcMP3File)
        Local lcMP3Str, lnFHand
        lnFHand = FOPEN( tcMP3File )
        If lnFHand > 0
            = FSEEK( lnFHand, -128, 2)
            lcMP3Str = FREAD( lnFHand, 127 )
            = FCLOSE( lnFHand )
            If uppe(subs(lcMP3Str,1,3)) = [TAG]
                lcMP3Str = subs(lcMP3Str,4)
                taMP3Info(1) = allt(subs(lcMP3Str, 1,30))+chr(0)
                taMP3Info(1) = allt( left(taMP3Info(1),at(chr(0),taMP3Info(1))-1) )
                taMP3Info(2) = allt(subs(lcMP3Str,31,30))+chr(0)
                taMP3Info(2) = allt( left(taMP3Info(2),at(chr(0),taMP3Info(2))-1) )
                taMP3Info(3) = allt(subs(lcMP3Str,61,30))+chr(0)
                taMP3Info(3) = allt( left(taMP3Info(3),at(chr(0),taMP3Info(3))-1) )
                taMP3Info(4) = allt(subs(lcMP3Str,91, 4))+chr(0)
                taMP3Info(4) = allt( left(taMP3Info(4),at(chr(0),taMP3Info(4))-1) )
                taMP3Info(5) = allt(subs(lcMP3Str,95,30))+chr(0)
                taMP3Info(5) = allt( left(taMP3Info(5),at(chr(0),taMP3Info(5))-1) )
                Return .T.
            Else
                Return .F.
            Endif
        Else
            Return .F.
        Endif
    Else
        Return .F.
    Endif
Endfunc

Function SendMciString( tcMCIcmd )
    Declare integer mciSendString in WINMM String, String, integer,integer
    Declare integer mciGetErrorString in WINMM integer, String, integer
    lcRetStr = Space( 80)
    lcErrStr = Space(256)
    lnRetVal = mciSendString( tcMCIcmd, @lcRetStr, Len(lcRetStr), 0 )
    If lnRetVal=0
        Retu Trim(Strtran(lcRetStr,chr(0),""))
    Else
        = mciGetErrorString(lnRetVal,@lcErrStr,Len(lcErrStr))
        Retu [错误: ]+Trim(Chrtran(lcErrStr,chr(0),""))
    Endif
Endfunc

有人说VFP不行了,我想说,你连VFP十分之一的功能都不会用,你怎么知道VFP不行?本人拒绝回答学生的问题我回答问题一般情况下只提供思路不提供代码,请理解
2008-06-22 16:58
快速回复:老师们请教了!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.043250 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved