|
The problem isn't "1 GB". The problem is "1 GB per Tab" - which is a bit different!
|
|
|
|
|
Oh, yes, the tabs you have mentioned. How much RAM do they have? 3GB RAM plus Virtual Memory, may still be enough. Have a look at the Virtual Memory, if that fills up then you have a problem.
I came, saw, and then coded.
|
|
|
|
|
The computers have 4 GB of physical memory (32 bit cpu), but I certainly don't get 4GB of memory. Actually it seems like I get roughly 1.1 GB. I presumed this was a .NET thing. Is there a site anywhere that actually says how much memory the .NET runtime can allocate?
|
|
|
|
|
I have found something here after a short google: http://bytes.com/groups/net-vb/381325-2gb-memory-limit[^]
Apperantly .Net can only use maximum of 2GB because of two user modes which do split the total memory. ... so I got it.
And yeah, 4GB on a 32Bit Windows actually is only 3GB total. I don't know why Windows swallows one.
I came, saw, and then coded.
|
|
|
|
|
OK, I have my doubts that you actually have a problem here but this could be a solution if you really want to code something ...
Now this idea I already has been mentioned. But I shall explain it a bit deeper and I would like to call it the Google Map approach. It is about cutting the big monster image into smaller pieces, store those pieces on the HDD as temporary files and only load those that are within the view. Which means you will require some sort of zooming function too. Also you will have to calculate the actual visible pixel in the view and the pixel of your image pieces you use. I think this way you could determine whether an image downsize could help. Of course the downsize only will happen to the loaded pieces in the RAM, neither the original nor the cut version on the HDD. If they apply a filter then you should load all the image pieces from HDD, process them and save back.
There may occur some lag because of the image loading time from HDD but hey, they want to work with monster images! However, this approach is some sort of streaming which means you really only load that what you need to work with and not the entire thing. I never coded it before but I think Google did.
I came, saw, and then coded.
|
|
|
|
|
This is pretty much in line with what I was thinking I might have to do. There is quite a bit of work to it but it just might be the way to do it! Thanks for the assistance.
|
|
|
|
|
No problem, great minds think alike.
I came, saw, and then coded.
|
|
|
|
|
Hello,
i have local virtual drive..so is any one know how deal with that drive using C#..
ex: format, change label name, get free space and used space..etc..
Thanks
|
|
|
|
|
Have you tried looking into WMI it will definitely get you the information you want but I am not sure what data you can actually set.
Here[^] is the first in a series of articles that claims to teach all there is to WMI (I have not read so I can not comment) If it's not good then google 'WMI' as it will surely be what you are looking for
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi,
Windows Explorer has a menu Tools/MapNetworkDrive, which confusingly also works for local stuff; you can map any partition, and any folder to a drive letter (until you run out of free letters).
Then you can use P/Invoke to get what you want, using:
[DllImport("kernel32.dll")]
public static extern int GetVolumeInformation(
string rootPathName,
StringBuilder lpVolumeNameBuffer,
int nVolumeNameSize,
int lpVolumeSerialNumber,
int lpMaximumComponentLength,
int lpFileSystemFlags,
StringBuilder lpFileSystemNameBuffer,
int nFileSystemNameSize);
[DllImport("kernel32.dll")]
public static extern int GetDiskFreeSpaceEx(string rootPathName,
ref long lpFreeBytesAvailable, ref long lpTotalNumberOfBytes,
ref long lpTotalNumberOfFreeBytes);
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi, I have tried sendmail mainsend and ifobootemail etc and none seems to work. I want to send mail to a gmail account for starters when a certain condition is met via a batch file.
So, am I correct in these programs do not work anymore or am I doing something wrong???
Thanks,
Antone
|
|
|
|
|
|
Hi,
Thanks for the reply. The last update was in 2004. I have saw this one. Does anyone know of a program that know will work for sure with gmail 100% that they have tested???
Also that program does not seem to include STARTTLS which gmail uses.
Thanks,
Antone
modified on Wednesday, July 8, 2009 4:37 PM
|
|
|
|
|
Antone, does it have to be some external command line client, or can you do it within the program itself? If you are able to do it via code, check out the post below "Send email in winform with Yahoo or Gmail account".
|
|
|
|
|
Hi - Yes it can be a seperate program unless the batch process decides not to return. Anyway I hoping to use command line emailer. Hard to believe there is not one out there that will work with gmail other webmail type programs.
I simply want to send 1 freaking email to a gmail account from with in a batch file, but seems that is too much to ask after 60 years of computing. If we would stop trying to make everything so propritary we would all be able to communicate. This seriously hinders knowledge and hold back our ultimate progress not only in computers, but in all fields such as medicine, physics etc.
Very frustrated,
Antone
|
|
|
|
|
Just a thought, Make the program. It wouldn't be that hard, Or atleast i don't think it would be.
|
|
|
|
|
Hello all,
Does anyone know if the Dispose() method must be explicity called on every object that implements IDispose? In other words, will the Garbage collector call the Dispose() method when the object's life expires. Don't get me wrong, I know that it's good practice to clean up your own trash but I didn't know how serious of a memory leak this issue is.
In addition to that, what about un-wiring event handlers from a class before it's reference is set to null? I've code that removes handlers and code that doesn't.
Any thoughts?
The hurrier I go, the behinder I get.
|
|
|
|
|
Hi,
this is how I understand it:
1. you should call Dispose(), it makes life easier for the GC, and it frees resources sooner.
2. Managed objects that die will be disposed by GC if and when it runs; it does not run when no more memory requests are needing a garbage collection, and in particular when an app terminates.
3. you must make sure Dispose() is called when unmanaged objects are involved.
4. you don't know (unless it is documented) whether managed classes create unmanaged objects internally, so call Dispose!
5. A process exiting will clean up everything, which does not imply your resources will be in a state you like; e.g. a process will close its open files, it may not have written the closing texts to it if you don't take care.
6. When you hand over a delegate, it includes a "this" pointing to the object on which the delegate is to be called. So passing a delegate to a live object keeps your object alive too. But not the other way around, so it is no problem most of the times.
Example1: your class instantiates a dialog and passes a delegate to one of the dialog buttons; the dialog keeps your class alive, but it was modal anyway. When the dialog closes, it gets disposed and the delegates are gone.
Example2: your form passes a delegate to an object (maybe a singleton) that lives for the life of your app, e.g. to get signaled when a logging component gets a problem, say a disk full condition. When you close your form, it remains alive because of the delegate. If all your forms do this, none of them ever releases its memory.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks Luc!
I agree that just because some class is managed, doesn't mean that it will not call unmanaged code. (Good point)
You've definitely cleared up some question marks in my brain!
The hurrier I go, the behinder I get.
|
|
|
|
|
Richard Blythe wrote: what about un-wiring event handlers from a class before it's reference is set to null? I've code that removes handlers and code that doesn't.
AFAIK, you don't have to unwire each event. Setting it to null will remove the invocation list.
|
|
|
|
|
However, if consumer1 and consumer2 both wire to some event in producer3, and only consumer1 wants to exit the game, then noone is allowed to set the event to null since that would break the producer3-consumer2 relation.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Yeah. That's right
|
|
|
|
|
As far as I'm concerned, the definitive article on finalizers and disposable objects can be found over on Joe Duffy's Blog[^].
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I absolutely disagree with the "Dispose(bool)" pattern.
It's verbose and hard to use correctly. And it's only really useful when a class contains both managed and unmanaged resources, and there might even be derived classes that have their own unmanaged resources.
The solution is simple: don't do that.
Instead, create a sealed class for each unmanaged resource (bonus points if its derived from SafeHandle). Then your other classes only have to deal with managed resources, so they never need a finalizer and the Dispose method is trivial (just call Dispose on all members).
For more details, take a look at Stephen Cleary's article 'IDisposable: What Your Mother Never Told You About Resource Deallocation'[^].
|
|
|
|
|
I am attempting to do a custom OnPaint on a custom Treeview with a lot of bumps along the way. At this point in the game, I'm just trying to get a purple rectangle to print out anywhere involving this TreeView. I'll work on the bounds afterwards.
I found out the long way that WndProc turns off OnPaint and am trying to now to override WndProc, but I have absolutely no idea what to pass to OnPaint seeing this is my first attempt at GDI and from all the examples I've been looking at OnPaint appears to be called implicitly by other Win Forms. Please point me in the right direction.
public class myProfileTree : System.Windows.Forms.TreeView
{
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
SolidBrush brush = new SolidBrush(Color.MediumOrchid);
Rectangle blueRectangle = new Rectangle(50, 50, 200, 100);
g.FillRectangle(brush, blueRectangle);
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case(15):
{
OnPaint( );
break;
}
default:
{
break;
}
}
base.WndProc(ref m);
}
}
|
|
|
|