|
I do appreciate if some one help me with sample code
|
|
|
|
|
in the absence of your ability to use google and search for vb.net delete files :-
Dim s As String
For Each s In System.IO.Directory.GetFiles("C:\WINDOWS\TEMP")
System.IO.File.Delete(s)
Next s
how about in future you at least attempt to google for different solutions, post some code you've tried, if it doesnt work, rather than ask a question like this
|
|
|
|
|
Dear Sir, actually i want to delete Temporary Internet Files from my computer programatically to avaoid low disk space, please give me the solution i u can. I will be highly gratefull.
|
|
|
|
|
Solve the problem instead of treating the symptomes.
Open the Internet Options in IE and go to the settings for temporary files. The default settings for maximum disk space used is a percentage of the total disk space, which usually is far too much nowadays. Adjust it to a reasonable value, like for example 50 MB.
---
single minded; short sighted; long gone;
|
|
|
|
|
Environment.SpecialFolder gives you the path to things like My Documents. It should give you the location of the temporary internet folders, or you can use the values it does give, to work it out.
Yep, it's Environment.SpecialFolder.InternetCache
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 )
|
|
|
|
|
If you can't understand what you've been told, then you need to learn a little more before you attempt this task. The web seems to be full of people who think that asking for full solutions and typing them in, is programming. It's not. Buy a book, and work through it. You've been told everything you need to know to perform this task, on this thread. That you can't work it out, is an indication that you need to learn some basics.
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 )
|
|
|
|
|
You do seem to be making a habit of talking to yourself. People will begin to wonder.
|
|
|
|
|
LOL... reminds me of the old joke:
I'm a schitzifrenic... and so am I.
|
|
|
|
|
How VB.net is different from VB 6.0
Pramod
|
|
|
|
|
This question has been asked countless times already. A simple web search should provide you with an abundance of information.
If you have more specific questions about the differences, they would be suited for discussion in a forum.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: This question has been asked countless times already.
Yes, but it's always fun to answer :P
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 )
|
|
|
|
|
Google broken where you live ?
VB.NET is an object oriented language that is based on the .NET framework and uses verbose, English like syntax that some people find comforting, and others find annoying. This pursuit of simplicity actually complicates VB at times, but it's still a powerful language.
VB6 is a joke. Everything bad about VB.NET is stuff that was carried over for VB6 to help people migrate to it. It's main purpose in life was to let people who could not learn C++, write simple business apps
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 )
|
|
|
|
|
You C++ people can't understand that sometimes people have a preference for vb.net nto because they are incabable of learning C++, perhaps you shoul watch how you phrase things because alot og things you say are sounding more and more like th industry standard arrogance that everyone should avoid. Its what makes the IT world frightening to some people because you overwhelm them with the idea that they know so little that they may as well leave it to the people who already know it instead of learning it themselves.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
Hey, I said that VB.NET is more English like, and that some people like it that way. What else do you want ? VB6 is still a disaster, that's just the truth.
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 )
|
|
|
|
|
so you say that vb is a disaster..?? dont ever do the mistake of comparing between languages.. Programming in any language is child's play.. but to have the right knowledge of WHAT to do and WHEN to do, is more important..
Take it as an advice..
The name is Sandeep
|
|
|
|
|
Xandip wrote: so you say that vb is a disaster..??
VB6 was and is, yes.
Xandip wrote: dont ever do the mistake of comparing between languages..
Why not - should I just choose them blindly ?
Xandip wrote: but to have the right knowledge of WHAT to do and WHEN to do, is more important..
I'm not sure what this means, but I have used VB6, and I stand by my comments - it's poorly designed, and poorly put together, Microsoft obviously just threw stuff at it, their only desire to make it easy for people in suits to get a button on a form and a view into a database.
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 )
|
|
|
|
|
Christian Graus wrote: Why not - should I just choose them blindly ?
you must choose them, based on the needs you have.. you tell that vb is a joke bcoz its of no use for you.. The same way.. sometimes i think that whats the use of C++ ??
Christian Graus wrote: get a button on a form and a view into a database.
May i remind you that the programmer is not the one who decides what the interface should show, and how to respond when a button is clicked.. Its the user requirement which forces the programmer to do so..
So even if your client wants to view the database with a single click, then i dont think you will be able to do it without VB.
The name is Sandeep
|
|
|
|
|
Xandip wrote: you must choose them, based on the needs you have..
VB6 was created to service one need - the need to write code for people who didn't know C++, and couldn't or didn't want to learn it. That's just a fact.
Xandip wrote: The same way.. sometimes i think that whats the use of C++ ??
ROFL - that's a pretty ignorant view, given that without C++, VB would not exist, nor would Windows. And especially given that C++ is the *only* widely used language on Windows that can do *anything* that's possible to be done. I'll write you a business app in C++ before you can write me a 3D game in VB6.
And, VB6 always traded on the ability to buy COM components ( written in c++ ) to do the things it could not do.
Xandip wrote: May i remind you that the programmer is not the one who decides what the interface should show, and how to respond when a button is clicked
So what ?
Xandip wrote: Its the user requirement which forces the programmer to do so..
Correct
Xandip wrote: So even if your client wants to view the database with a single click, then i dont think you will be able to do it without VB.
Then you have absolutely no idea what you're talking about, and should just give up on the discussion. VB6 may let you do that with less lines of code than C++ ( C++ doesn't have particularly great libraries for database support ), but to say that C++ couldn't read a database table so a user can view it, is just plain ignorant. When you write code in VB, it's still C++ that is reading the database, anyhow. VB is a layer of abstraction to keep the code simple for you.
This discussion is moot now anyhow. C# and VB.NET are the best ways to write that sort of business application, they are easier to use than C++, have more up to date libraries, and don't suffer from the bad language design that VB6 did, although I still prefer C# because of things like sane syntax and strong typing. I said from the start, I have no issue with people prefering VB.NET, both C# and VB.NET perform equally and have the same libraries to call on.
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 )
|
|
|
|
|
I am relatively new to .net. While I have dabbled in it, I haven't done anything serious. Now I'm trying to build a fairly complex dll/assembly and am running into a real frustration.
I need to have a property that is both read/write and pulls/puts data into a collection based on a unique key. The problem is, I can't overload the set portion to allow for the key to be passed along with the value. Here are the examples of both uses:
MyValue = Field(100)
Field(100) = "Frank"
I could do this very easily in VB6. I know this is more like a function than a property. Do I really need to write two functions with one overloaded? And if I do that, the second let syntax won't work. It would look like this:
Field(100,"Frank")
While that's useable, it's not very consistent or user-friendly for someone using this assembly. Not only that, it creates a real migration problem. Any suggestions would be greatly appreciated.
CalmlyFrustrated
|
|
|
|
|
|
Thanks for the suggestion. This particular function/property doesn't necessarily have sequential numbering. It also has potentially 65535 indices. I don't really have a choice as to the structure (it's a file format of a third-party program). What I'm using in VB6 is perfect and I'm struggling with the idea that dot net can't do it. It feels like I'm going backwards porting things to dot net.
Public Property Get Field(FldNo as Long) as String
..... code
End Property
Public Property Let Field(FldNo as Long, Value as String)
..... code
End Property
This allows the calling routine to address this property just like any other property. I originally wrote it as a method but the property approach is so much more convenient to code.
CalmlyFrustrated
|
|
|
|
|
Indexors don't have to use sequential numbering, though that's probably what you saw in the example, you can do anything with the index and the value once you have them. The index doesn't even have to be number. But if you want another alternative you could declare a struct with a long and a string and have that be the Type of your property. No other options come to mind but good luck.
|
|
|
|
|
hi,
I am looking for some simple Visual Studio Projects for senior secodary students (17-18 yrs old) as part of a course in programming using Visual Studio 2005.
They have been through the IDE in painful detail and now want to get their hands dirty with some projects.....
I would really appreciate it if someone could recommend a book or set of projects which I could find/purchase/steal to assist these kids and me (of course)
Thanks in advance
|
|
|
|
|
I am 17 years old and am self-taught, i always found simple projects like timers, programs that work with math problems etc. A good one is also word processor, maybe to be worked on all together, there is a great example on codeproject that you can start with. Another good one is working with textboxes and .txt files and the steamreader and writer classes to save and retrive text from text files, quite simple but good to learn.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
I am a junior in high school, self-taught, and I just code random programs for my classes. My website: thomas.stockwell.googlepages.com has most of the programs that I have worked on, as well as some source code for some of the projects. For some fun GUI applications I would suggest a game like battleship which can be found at my website. Currently for my AP Computer Science course I am working on a chess game that is tackling graphics and logic.
A few books that I have found very insightful and fun to work with have been VB.NET Hacks and Pranks. The book covers various mathematical operations relating to fractals, custom drawing routines, windows customization, windows control customizations and I believe it has a few games in their too.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|