|
What do you need to change with the languages? If it is text only, I'd suggest to set it rather "directly":
c.Text = Resources.GetString(resourceName, CultureInfo);
(resourceName is likely c.Name, but I am not sure with this point).
instead of
Resources.ApplyResources(c, c.Name, CultureInfo);
|
|
|
|
|
Bernhard Hiller wrote: c.Text = Resources.GetString(resourceName, CultureInfo);
Thanks a lot. That works the way I need it.
|
|
|
|
|
So I'm getting my feet wet in .net 3.5 in VS 2008.
Made a form with a button to open another form.
On the called form. I close the form. Simple enough.
I build the exe
I start the program (watch memory usage in task manager),
click the button to open the other form (watch memory in task manager),
then close the form (watch memory in task manager).
Keep repeating. Memory usage just gets larger.
Button click does this: foo_form.show()
Use the window close [X] top right of form.
Looks like memory is leaking.
Don't rememebr vb6 doing this.
Many thanks.
|
|
|
|
|
My guess is that the memory usage hasn't grown enough to trigger the garbage collector.
You could try calling Dispose() on the second window after it closes and see if that has any effect.
You could also try "manually" invoking garbage collection after the second window closes (first setting any references to it to null).
|
|
|
|
|
Thank you. Seem to remember something about garbage collection
being automatic. The environment looks pretty slick. Should
be lots of fun.
|
|
|
|
|
Bret Stern wrote: watch memory in task manager),
There's your first mistake. Task Manager is not showing you how much memory your application is using, but how much the .NET CLR has RESERVED for your application. Use the .NET Memory counters in PerfMon to find out how much memory your app is actually using.
By reserved, I mean your application can free memory that it isn't using any more but that memory goes back the Managed Heap for future allocations. It will not be freed back to Windows unless the CLR deems that it doesn't need the memory or Windows starts to run low on memory and requests that the .NET CLR frees up whatever it can.
The is a completely automatic process and the .NET Memory Manager does it's job very well. You do not need to worry about freeing up the memory yourself.
Next, this depends on what you're using to show the second form. If you use the .ShowDialog() method on your form instance you MUST call Dispose() method on the form instance when you're done with the form. If you don't do this you WILL run into memory and handle issues, possibly running Windows out of resources.
Oh, and do NOT call GC.Collect() unless you know exactly why you're doing it and understand completely the impacts on the GC. You can easily negatively impact the performance of your application by calling Collect unnecessarily.
|
|
|
|
|
Not use to the memory babysitting. Thanks for the explanations.
|
|
|
|
|
I have to track the lists of all the visited urls from any browser like Internet Explorer, Mozilla Firefox, Google Chrome, Opera etc.
To get the all opened tabs in the Internet Explorer, I have used the below codes :
SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();
string filename;
ArrayList windows = new ArrayList();
foreach (SHDocVw.WebBrowser ie in shellWindows)
{
filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
if (filename.Equals("iexplore"))
{
Console.WriteLine("IE Url for '" + ie.LocationName + "' is " + (ie.LocationURL));
}
}
But my question is that how can I get this same all the opened tabs description from other browser?
I have found the below code to get the only one tab which is open in the browser.
using DDE to get the current tab.
private string GetBrowserURL(string browser)
{
try {
DdeClient dde = new DdeClient(browser, "WWW_GetWindowInfo");
dde.Connect();
string url = dde.Request("URL", int.MaxValue);
string[] text = url.Split(new string[] { "\",\"" }, StringSplitOptions.RemoveEmptyEntries);
dde.Disconnect();
return text[0].Substring(1);
}
catch {
return null;
}
}
I have checked WinPCap, SharpPcap, Pcap but could not get the right solutions to solve the issue.
I need a source code using c# which will be running successfully in .Net 2.0 framework to get the all visited urls lists from all the browser.
Please help me to solve this issue.
|
|
|
|
|
Member 10501211 wrote: I need a source code using c# which will be running successfully in .Net 2.0
framework to get the all visited urls lists from all the browser. Impossible.
I'm often using Lynx, simply because it's not one of the most often used browsers
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You cannot do this by writing a single piece of code.
Every browser stores its history differently. You're going to have to write different code for every browser you want to support.
|
|
|
|
|
You need a totally different architecture.
In the local network, install a proxy server. Setup the network such that all computers have to use the proxy server to reach addresses outside the LAN.
In the proxy server, enable logging. Now you only need an application for reading and analysing that log file.
|
|
|
|
|
It'd be much easier to just setup a span port on the LAN and run Snort, Bro, etc. Can always do Security Onion or similar as well to get a full spectrum look at traffic.
This does assume static IP, of course.
|
|
|
|
|
can anyone help me to create .exe while creating exe its asking demo version sherdian controls i tried many things like threed32.ocx regedit etc but all in vain
error : licensed not found
|
|
|
|
|
|
hi alla
need some suggestion from you to develop a application
i have been assigned to code a application which will be used by the data entry to key-in the information and generate the reports.
the data at present keyed in as below
ITEM FORMULA vALUE
A A 7
B (A*2) 14
C c 3
D D=A+B+C 24
E E 2
F F=D+E 26
G F*5*2*3/1000 0.78
THE Aboave is the data been present keyed in Excel i am been assigned to develop a application. They have so many sheets with these formula..
i am not able to decide as to take these things a columns or rows. as the formula need to be executed and these formula get changed sheet to sheet.
This need to be achieved with SQL & .Net please kindly guide for how to go ahead coing i can do but i just need the logic.
thanks
kumar
|
|
|
|
|
TNKumar wrote: i can do but i just need the logic. Logic for what? All you have told us is that you have to develop an application, no information on what it is supposed to do.
|
|
|
|
|
hi
i am been told to develop
i need your suggestion how to execute this formulas if i take them as records are should i take them as columns.....as this is a sample there are about 60 lines like this
please kindly suggest
|
|
|
|
|
As I said before we have no idea what you are trying to develop. Either explain what your program is supposed to do, or talk to your manager and ask them.
|
|
|
|
|
Hi
My Program has to do the calulation
A A 7 - Entered
B (A*2) Formula need to be calculated
C c 3 - enttered
D D=A+B+C Formula need to be calculated
Is there any way or process where the Formula stored in a record can be calculated with passing values.
Thanks
|
|
|
|
|
|
If you can use PowerShell, try this:
PowerShell.exe -nop -noe "&{$A=7;$B=($A*2);$C=3;$D=$A+$B+$C;$E=2;$F=$D+$E;$G=$F*5*2*3/1000;$B,$D,$F,$G}"
|
|
|
|
|
I am working on a .Net application that needs to access the AS400 for some real-time and iDB2Connection is slow accessing DB2. any idea how can I improve it?
My connection string:
Dim connection As iDB2Connection = New iDB2Connection("DataSource=" & My.Settings.Server & ";" & _
"userID=" & My.Settings.ServiceID & ";" & _
"password=" & My.Settings.ServiceIDPass & ";" & _
"DefaultCollection=" & My.Settings.Library & ";" & _
"SSL=" & "False" & ";")
|
|
|
|
|
|
What do you mean by "real-time" in this context?
Executing a query will take time, fetching and using the resulting data will also take time. How time-critical would this need be? Does it need to complete within 20ms? Less?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Current execution time is 5 rec per sec. Which is not acceptable
|
|
|
|