|
See this article at vbAccelerator it explains how to detect alt-tab and other events that you might not catch. I think a form is probably the best way to do it as it can hang outside the main window if neccessary.
|
|
|
|
|
Hi, Any method or Class available for getting the following purpose served ?
== Situation==
My software has navigated an website and extracted a link from
<a href="/abc/def/ghi.JPG">Click Here</a>,
and the URL of the navigated website is
http://www.myWebSite.com/pictures/good/
== Purpose ==
Now, I want to contruct a Full abosolute URL of the Image link based on the Website URL like this,
http://www.myWebSite.com/abc/def/ghi.JPG
==================
== QUESTION ==
IS THERE ANY CLASS that can do these works for me or I will have write all dirty codes to do this job !!
Thanks and I appreciate your help in advance.
Emran
|
|
|
|
|
|
Thanks,
I used this convention ~ in ASP.NET, but this is I am doing for WinForm. Will ~ works for WinForm Application As well ?
Thanks
|
|
|
|
|
You could try using the UriBuilder class:
<br />
UriBuilder builder = new UriBuilder();<br />
builder.Host = "www.myWebSite.com";<br />
builder.Scheme = "http";<br />
builder.Path = System.IO.Path.Combine("pictures/good", @"/abc/def/ghi.JPG");<br />
<br />
string absoluteUrl = builder.Uri.AbsoluteUri<br />
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
hi!
i'm using VS 2005 express to build C# .NET 2.0 windows applications.
I've done a simple user control with 3 pictures box which are vumeter for cpu, ram and network bandwith. the width of the picture box go from 1 to 100 pixels in relation with pourcentage of cpu used, ram used or network bandwith used.
On a timer (each 500 ms), i get all informations to calculate correct vumeter width and set tooltips on this vumeter to show informations when mouse is over vumeter.
My probleme is that this user control eat a lot of RAM (2 mo per minute if timer is set to 10 ms) because of tooltips. If i put tooltips code in comment, all is ok.
so i think there's a problem in .NET framework with tooltips on Picture box.
can someone confirm this bug in .NET 2.0 ?
a little test :
- create a new windows application
- create a flow layout panel on main form
- create a usercontrol with a picture box and a timer (10 ms interval)
- on each timer tick, set a tooltip on the picture box
- add this usercontrol on the flow layout panel
here is my tooltips parameters
automaticdelay = 1
autopopupDelay = 60000
initialDelay = 1
reshowDelay = 0
showAlways = true
run your program for some time (10 min) with or without the setTooltips and watch ram used by the application.
am i mad or there's really a probleme on .NET framework ?
Fabrice Deshayes aka Xtream
http://www.xtream.be
|
|
|
|
|
Are you creating a new tooltip each time? I would check there for any memory leaks.
Are you sure it's actually a memory leak, or is it that GC hasn't happened yet?
|
|
|
|
|
no, i'm not creating a new tooltips each time. I've only one tooltip component that i've drag'n dop on my usercontrol. The only thing i'm doing is :
myTooltip.setTooltip(myCpuVumeter, myCpuString);
myTooltip.setTooltip(myMemoryVumeter, myMemoryString);
myTooltip.setTooltip(myNetworkVumeter, myNetworkString);
myTooltip is created only one time in the designer generated C# code.
the 3 Strings are private variables of my class. i don't do a new in the timer for these string, only change their content like this :
myCpuString = String.Format(resources.GetString("SysInfos_17"), cpuUsed);
i don't think GC hasn't happened yet because i've wait long hours and days and memory increase without ending.
with comments on setTooltips code lines, i'm running my apps fine in 39 mo since an hour.
if i let the 3 setTooltips code lines, i'm at 100 mo in 20 minutes!
|
|
|
|
|
Does it only occur if you have a picture box in a user control in a flow layout?
---
b { font-weight: normal; }
|
|
|
|
|
i've done the test and put it here
http://perso.wanadoo.fr/xtream/TestTooltipsMemoryLeak.zip
only a form with 3 picture box and a timer which change tooltips value on picture box.
Timer is disable by default, you've got to press button to enable it and watch memory used with windows task manager.
it seems that there's a memoryleak in the setTooltip method.
can someone try this apps (sources and binaries (in bin/debug) are include) and watch used memory with timer on and off to tell me if there's any trouble ?
for me, there's approximatly 1 mo per minute which is consumed and never released when timer is on.
|
|
|
|
|
Yes, I can see the memory usage go up.
I profiled it, and from what I can see there are no managed resources that causes this.
The application is going through a lot of memory, though. I displayed the garbage collection counters, and it does a garbage collection every five seconds.
---
b { font-weight: normal; }
|
|
|
|
|
I'm not shure to understand your profiling conclusion (maybe because .NET is new for me)
what does it mean "no managed resources causes this" ?
is it a problem that GC occurs each 5 sec ? is it too much or too less ?
|
|
|
|
|
Fabrice Deshayes aka Xtream wrote: I'm not shure to understand your profiling conclusion (maybe because .NET is new for me)
what does it mean "no managed resources causes this" ?
It means that the managed heap does not grow.
is it a problem that GC occurs each 5 sec ? is it too much or too less ?
Not really, but it's a bit much concidering that the program isn't really doing anything...
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
within my code,
webBrowser1.Stop() method is simply not stopping navigating. Is there any other alternative way available to STOP loading current navigating page of a WebBrowser Control ?
thanks
|
|
|
|
|
What exactly is happening?
|
|
|
|
|
Thanks for reply,
The event handler of a button is responsible for executing the following code,
weBrowser1.Stop();
But When I click the button, I see that the webBrowser is still trying to load the navigating web page and stops when it fisnihed loading, and sometimes it takes long time to load a huge page. I also verified that the event handler is really working, so there is no chance that, I clicked the Button to Stop WebBrowser but weBrowser1.Stop(); is not being executed. I am wondering, why the WebBrowser is not Simply being Stopped !!!
|
|
|
|
|
So, as an example, you have code similar to:
private void stopButton_Click(object sender, EventArgs e)
{
webBrowser1.Stop();
}
Correct?
Have you placed a breakpoint on the stop line to see if it's actually being called?
|
|
|
|
|
YEs, Right, My code is exactly like that and I placed breakpoint and also placed MessageBox.Show("I am inside the event handler") code to confirm that the event handler is really being called.
|
|
|
|
|
Guys,
I'm trying to write some classes so I can handle XML files more easily. I'm having quite some difficulty with the terminology of the Framework.
Are there some good tutorials out there that are clear? (I quickly searched CP, but couldn't find anything right away).
My goal is to be able to load/save (this one's OK) and modify/read the XML. I'm having difficulty with the terminology element/node/attribute.
I was thinking that an element and a node was the same and they have attributes, but after playing with it, that doesn't seem to be the case?
Any links/tutorials?
many thanks!
V.
Stop smoking so you can: enjoy longer the money you save.
|
|
|
|
|
The following link will show you the best XML tutorial I have ever found in the internet. This Tutorial will not will teach u XML, but also teach u how to work with XML in C#.NET.
good luck.
http://www.functionx.com/xmlnet/index.htm[^]
|
|
|
|
|
thanks a lot, the first thing showing up in google was a java snippet although the title on top of the page said C#
|
|
|
|
|
Elements and attributes are all XML nodes. A XML node is the basic building block of a XML document and besides the both named at the beginning there are some other types of XML nodes e.g. the XML declaration. To see what types are distinguished by the .NET Framework take a look at the XmlNodeType enumeration.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks, the whole thing is kinda confusing and without knowing where to look for...
|
|
|
|
|
in the name of god
hi.
how can i take handle of a object in other softwar(for example commbox in maya)?
tank you.
|
|
|
|
|
One thing that may start you in the right direction is the FindWindow[^] Win32 call.
|
|
|
|