|
The Fix:
The bitmap was being stored in another class.
The code was written as:
GetBitMap.getbitmap(<information>).Paint(g);
Rewrote the code as:
GetBitMap newClass = GetBitMap.getbitmap(<information>);
newClass.Paint(g);
newClass.Clean(); // remove bitmap from memory
The actual code is a bit more complex than the above example.
The code was written by another software company.
Robert
|
|
|
|
|
rlinder wrote:
// Memory Retention
// The new MemoryStream cause memory retention
return Bitmap.FromStream(new MemoryStream(buffer)) as Bitmap;
}
can be:
dim MS as new memorystream(buffer)
dim BM as bitmap = bitmap.fromstream(ms)
ms.close
return bm
}
sorry its VB code
|
|
|
|
|
I am using Visual Studio.net 2003 with the bundled Crystal Reports. I want to use a selection formula to select data based on the current value on my form. At the moment I have a dataform which has datafields and text boxes on it together with a cyrstal reports viewer. I have a text box called txtYEID on my form and a corresponding field in my database (and thus shown on my Crystal Report) called anuYEID. The selection formula I have at the moment is:
Dim myformula As String
myformula = "{tblYearEnd.anuYEID}" = "& chr(39) & txtYEID.Text & chr(39)"
CrystalReportViewer1.SelectionFormula = myformula
However when I trigger the code my CRViewer doesn't show any data! I've done messagebox.show on both txtYEID and anuYEID and the first shows the current data, but the second is blank - which I presume means it isn't passing the data to the field???
Once I've acheived this (if ever...) I want to separate the data form from the CR viewer so that they are both on different forms, but when I open the data form and select certain data, when I click a button to open the form with the viewer it will only show my current data - is this possible?
Any help would be gratefully appreciated
|
|
|
|
|
I realised there was an error in my formula and have corrected it to show as:
Dim myformula As String
myformula = "{tblYearEnd.anuYEID} = " & Chr(39) & txtYEID.Text & Chr(39)
CrystalReportViewer1.SelectionFormula = myformula
The mssagebox.show results are still the same and my code now triggers the error that anuYEID requires a number - so I guess it still not passing the number from one box to the other.
I would appreciate any help
thanks
|
|
|
|
|
form numbers
CrystalReportViewer1.SelectionFormula ="{Customer.Cust_No } = " & CInt(txtCustNo.Text)
for string you have to use
CrystalReportViewer1.SelectionFormula ="{Customer.Cust_Name } = ' " & CInt(txtCustNo.Text) & "'"
James Kennelly
|
|
|
|
|
Thanks for your help - really appreciated
|
|
|
|
|
Does anyone know how big a .NET app can be. I'm interested, if there is a limit of the size of an application ..
for example, assume that there is no hardware limit - there are few/enough GBs of RAM (if not, the os will use the virtual ram) - available .. and now i'm filling in a for loop (for example) an array ...
Does there exist any limit or restrictions which are known or defined, other then "not enough RAM or similar"?
Im interested if the app will "crash" after it becomes bigger then (for example) 1GB?
Does anyone know that? If not, what is the best way to check it?
Im not sure if that above is clear enough, but i hope it is.
I'm thankful for every answer!
denis
|
|
|
|
|
I'd say you'll never reach the limit if there's one, so why bother?
|
|
|
|
|
Depending on what your doing and using, an array has an index limit of 2,147,483,647 on a 32-bit processor...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As any process also .NET apps have some limitations in size.
On an normal Windows (not 64 bit) this limit is somewhere beyond 1 GB (in one of my projects I needed an decimal array with 80 million elements and I still know it was very near to the limit).
This is even simple to check: Just make an test app and create some kind of big array and make it bigger until the OutOfMemoryException comes
|
|
|
|
|
maybe i'll write an app to test this.
thanks@all
denis
|
|
|
|
|
hai
i am new to .Net
plz any one explains what is assembly?
and unboxing concept?
thanx..
|
|
|
|
|
An assembly basically is an executable file.
Boxing means "packing" a value type into a reference type. Unboxing is the "unpacking" of the value type.
(I hope I got that right...)
|
|
|
|
|
Hey, I am just wondering is there a way to turn off interpolating when drawing completely?
I am trying to draw an image in 2x size.
At the moment I am setting the Interpolating property to: System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor
This is the "lowest" setting I can find for it. With this it's fine, except there is a line in rightmost column & bottommost row. I tried to fix the solution by resizing the image adding 1 pixel to the width, and one to the height, and then I copied leftmost column to the rightmost, and topmost row to the bottommost. This works fine, but I am getting a feeling that this isn't a good way to solve this. There [b]has[/b] (I hope at least) to be a way to turn the interpolating off.
If there's not, I want to know if there's a better solution? Maybe I should write my own DrawImage method, but I am quite unsure which would be the best way to do this. Using SetPixel() and GetPixel() of Bitmap class would most likely be too slow. I could use LockBits() to retrieve the pixel data, and then play around a bit to copy the pixels to the destination Graphics. I want to stay away from "unsafe" code, as long as there is good enough design solution available.
Thanks.
|
|
|
|
|
Unless you draw your image in it's exact size (or a multiple of its size) interpolation *must* occur. If you're drawing the exact size, there's no interpolation.
PeterRitchie.com
|
|
|
|
|
Does anyone know of a good reference for this task?
I'm finally able to pull my development head out of the sand and look at the VS 2005 (beta 2), and I was blown away by the added complexity of doing something as simple as putting a few fields on a form (what ever happened to dialogs???) and then display a message. (AfxMessageBox? What's that??????)
|
|
|
|
|
If by C++.net you mean managed C++, I would start with a .NET introduction.
Most of the language-specific aspects of .NET documentation (i.e. books) aren't geared much towards C++--they concentrate on C# or VB.
PeterRitchie.com
|
|
|
|
|
I noticed some very stange values coming back from some calculations in a datatable and decided to investigate.
Has anyone come across the problem below
?CSng(.51) + 0.01
0.51999999046325684
?CSng(.57) + CSng(1)
1.56999993
I assume this is something to do with the way that the floating point value is held, but I've never seen it before.
I'm using VB.NET to do this, but has anyone else noticed similar behaviour in other flavours of .NET?
|
|
|
|
|
|
Yes, anyone who has done any floating-point calculations on a computer has run into this.
Welcome to floating-point.
PeterRitchie.com
|
|
|
|
|
Hi! I have an app that communicates over tcp/ip. About 50 people use the app and had no problems launching and executing it.But that was this one person in which the program didn´t launch, it just crashed and the error was:
"No Buffer Space Available -- A socket operation could not be performed because the system ran out of buffer space or the queue was full."
This happens i think when i create a new TcpClient and connect to the server.The strangest thing is that this part is inside a try-catch block to get the socketException Exceptions!!!
Any hints on this?The app runs fine on 50 other pc's but this one.Is it from my app or the pc ( I RATHER BLAME IT ON MICROSOFT ). By the way my socket buffer is 1k long, not MB.
Thx in advance.
Never say never
|
|
|
|
|
I HAVE TO MAKE APPLICATION WHICH WILL SERIALIZE/DESERIALIZE THE OBJECT HAVING FILES WITH EXTENSION SUCH AS .GIF, .TIFF.... ETC. AND COMPRESS IT TO ZIP FILES AND TRANSFER TO SERVER... REVERSE IS ALSO TO BE MADE IN THE SAME WAY.... CAN ANYBODY GIVE ME SAMPLE CODE/EXAMPLE ?
PLEASE REPLY ME AT.......... amit29_vjti@sify.com
please give me some idea...THANX
|
|
|
|
|
Hello hello !
This is my problem : I have created a deployment project and at the end of the installation i destroy all temporary files (which are not required for the good working of my program !).
The fact is after destroying the temporary files, when I run my program through a shortcut (that i put with the visual studio configuration project) the windows installer appears (and run some installation...) before my program appears at last !
Who can explain me this funny thing ?
When i don't destroy my 'temp files', I can run my program through my shortcut without problem !!!
Thank you for explanations.
There is no way to happiness, happiness is the way !
|
|
|
|
|
I assume you are deleting the files in a custom action that runs at the end of the installation?
The problem is that Windows Installer has no way to log the actions that occur in a custom action. So the installer does not know that you intentionally deleted the files, and it triggers the installer service to run automatically in repair mode because it detects a condition - missing files - that warrants a repair.
There are various workarounds, but all require techniques beyond what you can do within Visual Studio.
The only simple solution is to just leave the files on the target machine. This will prevent the installer from starting automatically in repair mode and does not require complex manual modifications of the msi package...
Robert
|
|
|
|
|
Hello Graham,
thank you for your answer !
Finally, I've just integrated the creation of the shortcuts in a custom action and not in the .net setup program itself ! So like this it works well !
I wish you a nice week-end,
bye
alain costanza
There is no way to happiness, happiness is the way !
|
|
|
|