以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]录好的一段音频,可以获取这段音频的时长吗  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=137722)

--  作者:yjm789000
--  发布时间:2019/7/13 15:25:00
--  [求助]录好的一段音频,可以获取这段音频的时长吗
录好的一段音频,foxtable有办法可以获取这段音频的时长吗?
--  作者:有点蓝
--  发布时间:2019/7/13 16:13:00
--  
以下方法仅支持 net4.0之后的Foxtable2019

把dll复制到Foxtable安装目录,引用:http://www.foxtable.com/webhelp/topics/1936.htm
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:interop.shell32.zip



Dim shell As new Shell32.Shell()
Dim file As String = "D:\\问题\\123.mp3"
Dim dir = shell.NameSpace(system.io.Path.GetDirectoryName(file ))
Dim item = dir.ParseName(system.io.Path.GetFileName(file ))
Dim ty as integer = 27
Dim det As String = dir.GetDetailsOf(item, ty)
msgbox(det)

ty值对应获取的属性有:
0   => Name

1   => Size     // MP3 文件大小

2   => Type

3   => Date modified

4   => Date created

5   => Date accessed

6   => Attributes

7   => Offline status

8   => Offline availability

9   => Perceived type

10  => Owner

11  => Kinds

12  => Date taken

13  => Artists   // MP3 歌手

14  => Album     // MP3 专辑

15  => Year

16  => Genre

17  => Conductors

18  => Tags

19  => Rating

20  => Authors

21  => Title     // MP3 歌曲名

22  => Subject

23  => Categories

24  => Comments

25  => Copyright

26  => #

27  => Length    // MP3 时长

28  => Bit rate

29  => Protected

30  => Camera model

31  => Dimensions

32  => Camera maker

33  => Company

34  => File description

35  => Program name

36  => Duration

37  => Is online

38  => Is recurring

39  => Location

40  => Optional attendee addresses

41  => Optional attendees

42  => Organizer address

43  => Organizer name

44  => Reminder time

45  => Required attendee addresses

46  => Required attendees

47  => Resources

48  => Free/busy status

49  => Total size

50  => Account name

51  => Computer

52  => Anniversary

53  => Assistant\'s name

54  => Assistant\'s phone

55  => Birthday

56  => Business address

57  => Business city

58  => Business country/region

59  => Business P.O. box

60  => Business postal code

61  => Business state or province

62  => Business street

63  => Business fax

64  => Business home page

65  => Business phone

66  => Callback number

67  => Car phone

68  => Children

69  => Company main phone

70  => Department

71  => E-mail Address

72  => E-mail2

73  => E-mail3

74  => E-mail list

75  => E-mail display name

76  => File as

77  => First name

78  => Full name

79  => Gender

80  => Given name

81  => Hobbies

82  => Home address

83  => Home city

84  => Home country/region

85  => Home P.O. box

86  => Home postal code

--  作者:有点蓝
--  发布时间:2019/7/13 16:14:00
--  
旧版本可以参考:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=50545&skin=0
--  作者:yjm789000
--  发布时间:2019/7/13 18:54:00
--  回复:(有点蓝)以下方法仅支持 net4.0之后的Foxtabl...
谢谢,可以了