In my project every time XML file is loaded and read thr Xml reader but when the form is closed it should be freed by memory but it does not happen its due to XmlDocument
I just for example tried to do inside the button i want that after pressing the button it should load and free the memory occupied by processor.
Do you have any idea you can tell me in class to load the XMlDocument and Unload XmlDocument
It sounds like you are watching some sort of Windows memory tool (like TaskManager). This is not an accurate way to analyze memory usage in the .NET Framework. (It does not instantly free memory when you quit using a variable.) Read a few articles like this[^], and you'll have a better understanding of the real behavior of garbage collection in the .NET Framework.
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
I have written a web service and need to connect to that using win form. In Visual Studio 2003, when I try to add web reference using LAN IP, it works. But if I use internet IP for the same service/server/IIS/machine, Visual Studio gives a prompt for "Discovery Credential For Proxy Server".
What I need to provide there, or how can I get rid of this, please help.
Hello dudes ?
I have another problem i use richtextbox to edit some text but i don't know how to insert multiple lines of text in that richtextbox but i need each line with its specific font and color attributes i used this code my friend gave me here is the code
but this code when i write one sentence ok it changes its font and color but when i write again the same sentence it changes the color and font of the first sentence to the defaul color and font and then it gives the new same sentence the changes in font and color i need to insert multiple lines of text and give each one color and font without being changed if i inserted again the same sentences what can i do ?
Please help me
That's because you're using Find to find the sentence in the text and it obviously is finding both the first and the new sentence. I'd suggest using another variable to store the *previous* index, looping till the last Find (until index returns -1) and then using the previous index to set the color stuff. Or, if there is something like LastIndexOf, you could use it.
I am trying to record the user actions on forms as part of my exception handling.
I've set up a singleton object that records all the control events i'm interested in and it works fine for the single test form. The form registers itself in the constructor and unregisters itself on disposal.
Then i thought i'd be clever and create a base class, let's call it myFormBase. I put the line to register the controls in the constructor:
ControlWatcher takes an argument of type form, i've also tried type myFormBase, but when i look through the controls for the form I only get the controls present on the base class, not the controls on the actual form i have passed in.
This is driving us mad, i'll try and keep it simple.
We have a custom control writtten in VB.Net compiled as a class library, this is added as a reference to a C# application, with the control being placed on its form.
They both have the same/similar root namespace eg:
CompanyName.Things.<the thing="">With me so far...the problem is that if at anytime after the component has been referenced the custom control changes, say for example adding a style enum to the control that can be set by designers, the forms that use this control complain about not being able to see the additions.
This is *most* true for our custom properties of the control that can be set by the designer.
Removing and re-referencing the component makes no difference, and of course i am sure the features being added are public available.
It seems (prove me wrong) that once a VB.Net custom control has been added to a C# application you can't make any changes to that custom control! That can't be correct surely.
I don't seem to have this problem if the custom control is written in C#.
How are you referencing the VB .NET library? Did you add it by browsing and selecting the dll (binary reference) or by selecting it from the Projects tab (in VS .NET) ? If it is the former and if Copy Local is set to true, then Visual Studio won't watch for modifications to the library, instead, it will simply use the local copy (that's what Copy Local does). My guess is that you added it as a binary reference, whereas for C# controls, you had them in the same project and therefore added them through the Projects tab.
You can try setting Copy Local to false (Right click on the reference in VS .NET, click Properties). Or, if the changes are very infrequent, you can manually copy the library to the C# project's bin/debug directory (or do it as a PreBuild step).
i m developing one application in which i want to access any pc( stadt alone, lan pc ,behind firewall pc).
what i have done for this is i have created one remoting server that is going to installed on pc which i want to access and i m accessing this remoting server from web serve through remoting client..
This thing is working fine in my internal lan . but when i tried this from out side i m not able to connect to my lan pc..
Waiting for your early reply...
Thanks in advance..
I have run time generated data table and table style including numerictextboxColumns. I set datatable to datasource of Datagrid1. Before setting datagrids table style, user can move on cells with tab key , after setting table style, when user try to move on datagrid with TAB key, cursor jump 2 cells not one :S
You will have to override the PreProcessMessage of the DataGridTextBoxColumn and NumericUpDown. There you can control the TAB key. Look for this method in MSDN. If you want I can post some code snippet.
theStructPt is a pointer to struct STRUCT.
I want to use it in C#, so I have this
public static extern TheFunc(IntPtr theStructPt);
I call the function and the theStructPt pointer point to my required struct now. But I dont know how to convert the memory where theStructPt point to to struct so I can use it. I want something like that: