|
Thanks for the responce, I tested those but they only seem to work for vb6
Thanks Anyway
Al968
Avast Antivirus-<url>http://www.avast.com<url>
|
|
|
|
|
you can still use them with interopt?
|
|
|
|
|
Impossible. There is no 'simple' way to decode an mp3, the simplest is to let WMP do it for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi!
I open a text file but before a create a loop to iterate throug alll records I want to know how many lines (records) in the text file.
fileReader = My.Computer.FileSystem.OpenTextFileReader(aspath + "\dictioneries\read.txt")
Is it possible without performing a loop? If it is, what is the right statement to use?
Thank You.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote:
Is it possible without performing a loop? If it is, what is the right statement to use?
Not that I know of. Why wouldn't you want to use a loop?
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Something will perform a loop even if it isnt you.
While fileReader.Peek <> -1
End While That is the loop I prefer to use for file reading.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
There's no way to do it without reading the entire file, preferrably in a loop. The FileStream classes don't know what constitutes a record, so there's no way for it to know how many there are.
There is a way to calculate it though, but only works in limited cases where every record in the file is exactly the same length. Get the size of the file in bytes divide that by the length of a single record, including the termination characters, if any. That'll give you the number of records in the file, but only if each and every record is exactly the same length.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am trying to write an RSS Reader, but I'm having some problems. I can get the data from each xml element, but I'm not sure how to organize them via element type (i.e. Title, Link and Description). I have searched everywhere, but all I can find are old examples that have hundreds of errors. How should I go about sorting the data? Is there some kind of trick in .Net 2.0?
The code I am using to read the data is:
Dim reader As New System.Xml.XmlTextReader("c:\feed.xml")
Dim contents As String = ""
While reader.Read()
reader.MoveToElement()
If reader.NodeType = Xml.XmlNodeType.Text Then
contents &= reader.Value & ControlChars.NewLine
MsgBox(contents)
End If
End While
Also, I have seen many examples use DataSets , is there any need for this? Thanks!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I know that you can treat an XML stream as a dataset and step through it but you are probably looking for something along the lines of what you have or XPath.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Thanks for the reply. How would I arrange the data via a Dataset then?
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hopefully this site[^] will help.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
Hi All,
I'm working with VB.Net 2003, I want to Get, Put, Delete the files in UNIX server via .Net programming.
I try to connect UNIX server using FTP its connected. then i'm trying to get the files its raising Error, I'm using NLST command,
the error is '500 NLST command not understood'
can any one help me out.
Thanks in Advance,
Ashok
|
|
|
|
|
It sounds like your FTP server on the UNIX box doesn't understand the NLST command. You might want to connect to it using a normal FTP clinet and try typing HELP to see what it understands.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello!
I created a directory under my specific project at design time and I would like to know how I get the directory name for the file residing under this directory.
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
I'm guessing you want the name of the directory that your app is in. So in that case, you can use the System.Environment.CurrentDirectory namespace.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Thank You!
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Hi,
I have been tasked with a strange query...
Can I write a VB.NET applications which will force the users to change their password every 90 days on a Windoes 2000 or 2003 server?
Currently we do NOT hve a domain but a bunch (5+) Windows Servers. Is it possible to write a script to be called by Windows Scheduler ever 90 days to force all our users to cheange there passwords on each server?
That is Phase A
Phase B - to include the abillity to do the same on a Red Hat server? And our ERP system?
Thanks
Phill
|
|
|
|
|
since you don't have a domain, I am assuming that each user has a local account on each server. if you set the policy of server to expire the password would that do what your asking about? --> no need for a script?
|
|
|
|
|
That is a method we tried but then each server (all 5 of them) asks the user to change his/her password one after the other.
Is there a script I could write, or steal, that I can ask the user to change password and propogate it to all 5 servers?
But you are correct.
Phill
|
|
|
|
|
THe problem with that script is that each server will ask for the previous password before it lets you set a new one. If the passwords are not synch'd from the start, the password change will work on some servers, but not others.
Your best solution is to create a domain environment, so everyone gets 1 account, not 5 different ones. Problem solved, and no code.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi everyone,
i am working o a project with vb.net that i want that this program read files sizes of files in a folder.
what should i have to do to begin that.
is there someone any idea?
|
|
|
|
|
alpdoruk wrote: what should i have to do to begin that.
First you should add imports system.io to yor project and then you will able to process directories and files.
use filesystem statment to reach the directories (filesyste.dir)
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
i found no examples for this subject.i don't have any idea where to start ?
|
|
|
|
|
I don't think if anyone can give you the whole coding for the purpose. Therefore, I suggest you to examine MSDN and search about system.io then you will discover teh whole thing. I am showing you a pin-hole.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Private Sub GetTheSizes(ByVal sDir As String)
Dim saFiles() As String = Directory.GetFiles(sDir)
Dim oFile As FileInfo = Nothing
For Each sFile As String In saFiles
oFile = New FileInfo(sFile)
MsgBox(oFile.Name & " is " & oFile.Length & " in size.")
'or add the line to a listbox or whatever
Next
End Sub
|
|
|
|