|
hello....
I need article to report in vb.net 2005,, do you have this article?
please...
Iam very...very... need it.
|
|
|
|
|
|
Hi can anybody help me? I need to retrieve the song play length for mp3 files for my program? I'm not concerned about the other ID3 tag information. Just the mp3 song length(aka individual mp3 file play lengths). please help. thanks
Mr Oizo
|
|
|
|
|
Hello Mr Ozio,
I hope the code below helps to retrieve information about MP3 file:
Option Explicit
Public Type MP3Info
Tag As String * 3
Songname As String * 30
Artist As String * 30
Album As String * 30
Year As String * 4
Comment As String * 30
Genre As String * 1
End Type
Function MP3GetInfo(strFileName As String) As MP3Info
Dim sTemp As String, iFreeFile As Integer
On Error GoTo ErrFailed
iFreeFile = FreeFile
Open strFileName For Binary As iFreeFile
With MP3GetInfo
Get #1, FileLen(strFileName) - 127, .Tag
If Not .Tag = "TAG" Then
Debug.Print "No tag for " & strFileName
Else
Get #1, , .Songname
Get #1, , .Artist
Get #1, , .Album
Get #1, , .Year
Get #1, , .Comment
Get #1, , .Genre
End If
End With
Close iFreeFile
Exit Function
ErrFailed:
Debug.Print "Error in MP3GetInfo: " & Err.Description
Close iFreeFile
End Function
Thanks,
James Smith
James Smith
www.componentone.com
|
|
|
|
|
Half that code doen't run.I think thats like vb6 or something. Dunno. I'll try change it a bit but I'm really looking to just get the mp3file play time length(song length)? What line or 2 do I use
thanks for the reply
Mr Oizo
|
|
|
|
|
Assuming this works at all, it looks to me like it reads id3 tags, which don't include length.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Both managed DirectX and the Windows Media Player can give you this info. MDX might be better, I think it will do it without a control being required on a form.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello all. I am in college, my major is CNS. However, we are taking programming I for VB.Net, and either my teacher is awful OR I am just dense when it comes to this stuff. Is there any websites that I can go to get Help via tutorials etc. for this? Any help is appreciated.
Thank you
Kristi
|
|
|
|
|
Search for ‘vb.net’ on Google and you will get enough links for tutorials.
However one which I may suggest you is www.startvbdotnet.com, check other sites also.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Thank you Dave
|
|
|
|
|
Hello. Like Dave said in his reply, and I know it sounds crazy, a lot of times when programmers get stuck the best place to start is google. Here is a tutorial I found via google:
http://visualbasic.about.com/od/learnvbnet/a/LVBE_L1.htm[^]
If you run into any specific problems you can always post it here.
Good Luck.
|
|
|
|
|
Thank you very much
|
|
|
|
|
Hi,
Here is a good VB .NET tutorial Click Here
The tutorial is a programming tutorial so it misses quite a bit of the background to .NET - however if you want to get stuck in to programming immediately it is well worth a look at.
In fact I used this to teach myself VB .NET so it comes highly recommended.
Good luck on your journey through .NET and enjoy
Guy
You always pass failure on the way to success.
|
|
|
|
|
Thank you so much for your help
|
|
|
|
|
Hi
Anybody out there know how to trace who was the last user to logon to a PC using a LAN account as opposed to a local account. I have tried various options searching the AD using the DSQuery and DSGET commands but rather think this may need some kind of vbs or VB script.
Thanks
|
|
|
|
|
This isn't tracked by AD or the machine, unless auditing is turned on. Only then will it show up in the machines event log.
|
|
|
|
|
Thank you for your quick response
|
|
|
|
|
I want to create a class to hold the many enums i have created, instead of having them in various applications.
I have need where somewhere where the class contents can be accessed without instantiating the class, for example.
Instead of....
Dim EnumObject as New EnumeratorClass
Dim Integer as int32
Integer = EnumObject.FileActionEnum.Open
I want to do.........
Imports SomeNamespace.EnumeratorClass (or something similar)
Dim Integer as Int32 = EnumeratorClass.FileActionEnum.Open
Can anybody give me a nudge in the right direction? (Yes i am new to VB.NET)
Thanks
|
|
|
|
|
It's a bad idea to put all of your enums into a single class. They belong with the class(es) that's going to use them. That's where you building your own class library comes in.
|
|
|
|
|
I agree with Dave.
It is well worth reading up on OOP to get at least an idea of how classes etc work.
It sounds like you are using a more procedural view point where macros, functions, constants etc are stored in a single place.
I mention this because coming from procedural languages myself I have had to shift my viewpoint - which can feel like parking an oil tanker in a space barely the size of a small car.
What I would suggest as a starter is to look at the wiki article on polymorphism - in fact here is a link Click Me.
Guy
You always pass failure on the way to success.
|
|
|
|
|
Thanks for the reponse.
I had already created the class but in light of your reponses i think i'll dispose of it and follow a better practice after reading up a little.
Cheers
|
|
|
|
|
I do have a reasonable knowledge of OOP concepts and can understand why to put the enums into their
respective classes, however i am a bit confused over the mention of polymorphism. I have read the link on Wiki.
Can you elaborate further why i need to undertand polymorphism in this case for moving the enums into their own classes?
Thanks
|
|
|
|
|
Hi,
Polymorphism is a concept in OOP where the same methods, properties etc can exist accross different objects and in essence behave differently.
For instance two classes called Aircraft and F1Car may have a method called Increase Throttle. The method for aircraft would increase the flow of air over the wings and cause lift whereas on the F1Car increasing the throttle would in effect cause the opposite to lift.
So you can have a method called Increase Throttle that exists across multiple objects and which has a different behaviour.
When it comes to programming you could even inherit the Aircraft methods, if you really wanted to, for the F1Car and override Increase Throttle to make it decrease lift.
The beauty of this is that, for instance with enums, you can declare the same methods or properties across multiple classes and they will behave accordingly - so no need to declare them once only and if you need a similar method for another class create something with a slightly different name (which is what you have do do in the area of procedural programming).
I hope this explains why understanding polymorphism helps.
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
I understand Polymorphism better than before because of your explanation, thanks.
I am still confused how this applies to my Enums though.
Do you have an exact example of how this would apply using enums?
Thanks
Ps:-
To be honest what i was trying to do in the first place was probably bad practise, trying to put enums all in one place. I think as mentioned by someone ealrier they should be contained in each class.
|
|
|
|
|
Lets say you have an enum called SpeedWarning that applies to Aircraft and F1:
The Aircraft enums may be as follows
SpeedWarning:
TooSlowStall = 120
TooFastManeuver = 350
Whereas the F1 car may have
SpeedWarning:
TooFastDryCorner = 150
TooFastWetCorner = 80
So both Aircraft and F1 car have SpeedWarning as an Enum however they both have different contents and values.
So in this case you basically want to represent different applications of the enum SpeedWarning depending on the class they are associated with(Aircraft or F1).
If SpeedWarning was defined as an enum in one place you would lose the polymorphism properties of OOP as you would have to create something akin to SpeedWarningAircraft and SpeedWarningF1 enums.
Regards
Guy
You always pass failure on the way to success.
|
|
|
|