|
I was thinking that once it was done searching the drive then it wouldn't need to consume as much memory. If I'm wrong, then I think it will be fine, I was just trying to optomise it.
Thanks again Nader. I never did get the other program you were helping me with to work, and the person I was doing it for found another way, so I stopped trying after like 7 revisions.
Tim
|
|
|
|
|
T.Willey wrote: I never did get the other program you were helping me with to work
That's bad news!! I hope you make it next time. Best wishes, and you are welcome anytime.
Regards
|
|
|
|
|
In .NET you typically dont have to worry continuously about memory consumption;
objects that are in use normally stay alive, and objects that are not needed anymore,
although not deleted immediately (as would be the case with unmanaged C++ destructors),
get discarded when the garbage collector sees fit.
Also 30KB is a really small amount on most of todays systems.
It still pays off to keep memory consumption in mind when performance is important,
so one should avoid making an excessive number of objects.
I see no problems with your application; there are some strings (as in all apps),
and the FileInfo and DirectoryInfo arrays go out of scope pretty soon, so they
are collectable.
If you want to save memory, you can:
- empty collections (e.g. ListView.Clear)
- set unneeded object references to null (so they become collectible even before
they go out of scope).
Both of these of course only if your program logic allows it.
As a last resort, you could invoke the garbage collector explicitly, but in
general, this is not a good thing to do. Normally just let it do it's thing...
Luc Pattyn
|
|
|
|
|
Thanks for the heads up Luc. I write C# very infrequent, so these are nice tips to know.
Tim
|
|
|
|
|
HI,
With the try,catch and throw you can also use "finally" and within the finally block you can release the resources that have occupied memory.
thanks,
vikram
Vicky
|
|
|
|
|
I am programatically adding items to the ListView Control. I also want to programatically scroll to the last item in the control...how do i do this?
|
|
|
|
|
try ListView.EnsureVisible()
Luc Pattyn
|
|
|
|
|
Thank You so much!
|
|
|
|
|
Hey guys,
I need to hide the VS Report (.rdlc files) print window dialog when printing (that one that shows "printing page X of Y", or something), like a silent mode. Is there any way to accomplish it? I think there's not any silent mode in this component, so i think i'll need to tweak it a little.
I'm printing a lot of reports at the same time and a lot of these windows appears to our users - and no, they don't like it. XD
Thanks for your attention...
bad, bad engRish... :/
|
|
|
|
|
First of all, thx for your replies. And sry about my broken english. I'm still noob . But that's not my homework but a problem i wanna solve. Till now i cant find the solution. Let me make it more clearly:
1) The site i tested is: www.ou.edu.vn/diemthi. U can log onto it to check it. There are 2 textbox: ID and password. ID and password are alike for example 10300005. So i wanna build a program that inserts the ID & password automatically and submit it. The ID can be inserted from x to y such as 10300005 -> 10300008 one by one. Is there anyway i can solve this?
2) Once u click the submit button, the mark page occurs. It has a table which contains the student's marks. And i wanna get those marks to add them into my database but i dont know how. I searched in the MSDN and many e-books but still cant find any object or function that can solve it.
Any ideas for me ?
|
|
|
|
|
An edu address, and it's not homework? hmmm.
Use Firefox and let it populate it for you.
|
|
|
|
|
1) Yes there are ways to do this including commercial and freeware products, but this is called hacking, and it's illegal. You should use the page they provided to access individual records, and if you want mass transfer of data you should contact the adminstrator rather than just hack into their website -not to mention how poor a hack this way would be-.
2) Same as (1). Also MSDN is not designed to answer specific question, it's a general technical documentation that gives you guidlines and general help. You tailor that help to suit your needs. If you did look carefully you could have seen several classes dealing with Http data transfer, and this is as far as I would tell you.
Forgive my rudeness, but your request is quite unacceptable without appropriate clarification of your motives.
Regards
|
|
|
|
|
teeboss wrote: But that's not my homework but a problem i wanna solve.
hahaha
i like the way you try and "hide" what you're trying to do.
|
|
|
|
|
ty? I considered it a good compliment
|
|
|
|
|
Hello
i have a pabx(panasonic) connecting to a printer and now i want to connect it to my computer.if someone have an idea he can give me or some links.
thank
|
|
|
|
|
I fail to see how your question has anything to do with C#.
But, if it's a link you want - Click[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I want to add a reference of Live Communication Server API to my application and use its functionality. But I am unable to trace the LCS APIs like RTC Client API. I would be great full if some one help me out in finding the pysical reference of this LCS API.
Thank in advance:
Rakesh
|
|
|
|
|
All you have to do is type "Live communications server" into the search box on MSDN. Click[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
My problem is: I have a "Mark review" web page that contains 2 textbox: username & password. When i insert the ID into the username & password textbox (password is the same as ID) and click submit button, it'll take me to the HTML page that shows the mark table.
The question is: is there anyway that i can use C# to build a program that insert the ID into the textbox automatically? After that, how can I get the mark in the table of the HTML page and add them to my own database?
I heard ppl said that i can use the WebBrowser control but sry, im still an amature. Pls help me solve this. Ty so much.
|
|
|
|
|
Actually, I don't understand a word of it... Obviously there's something wrong on your webpage[^], but you don't clearly explain what's wrong and what you wish to accomplish..
|
|
|
|
|
Aside from being unclear, as was mentioned, posts titled with URGENT or Critical Problem! are generally ignored.
If you would take the time to first read "How to get an answer to your question" then clearly describe your problem I'm sure someone can help you.
only two letters away from being an asset
|
|
|
|
|
Other than being incoherent, a "Critical Problem" usually means homework.
|
|
|
|
|
I have a problem.i cant raise any mouse events in my design surface.I tried with delegates but no use...Is there any way to raise events explicitly...like using interfaces
Ex :IComponentChangeService etc....
|
|
|
|
|
try importing SendMessage win32 APi with command WM_MOUSEXXXX
If u can Dream... U can do it
|
|
|
|
|
Hi there,
I wanna change the color of the blocks present in toolstripprogressbar. The default color is green. I want to change it to some other color.How can this be made?
|
|
|
|