|
I don't believe there's a built-in WinForms or WPF IP address control. But a quick google search reveals several articles on this site that show how to create one.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
can anyone tell how to use regex to fetch url's from a page
i'm getting the whole page using webclient class.
i want to know how to use mshtml to parse the text of page and get the list of url's from it.
i want to know the way to use regex??
Paritosh Tripathi
B.Tech. (C.S.)
|
|
|
|
|
If you download Expresso ( www.expresso.com ) it will help you learn how to use regex. It probably has a sample regex in it for URLs, too.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi maby someone can help me with this... I wrote a silverlight chart that gets it's data from a wcf service using linq to sql the following code fails and I have no idea why.
DataClasses1DataContext db = new DataClasses1DataContext();
var speeds = db.sao_GetMonthlyInterfaceData(Convert.ToInt64(code), routerSpeed, dateFrom, dateTo);List<String> values = new List<string>();
List<sao_GetMonthlyInterfaceDataResult> sp = speeds.ToList<sao_GetMonthlyInterfaceDataResult>();
IEnumerator<sao_GetMonthlyInterfaceDataResult> enumerator = sp.GetEnumerator();while (enumerator.MoveNext())
{
sao_GetMonthlyInterfaceDataResult val = ((sao_GetMonthlyInterfaceDataResult)enumerator.Current);
String ret = "";
ret += Convert.ToString(val.BpsIN );
ret += " ";
ret += Convert.ToString(val.BpsOUT);
ret += " ";ret += Convert.ToString(val.UpdateTime);
values.Add(ret);
}
return values;
</pre>
Maby someone out there can help with this.
Thanks
S
<div class="ForumSig">Stephen Lintott Bsc IT (RAU)</div>
|
|
|
|
|
It's hard to diagnose a problem with no description of what line in particular is failing as well as what message you're receiving.
Life, family, faith: Give me a visit.
From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord."
Judah Himango
|
|
|
|
|
When running the app I get the following. In the previous code if I remove the LINQ call the error seems to disapear... Sorry for not including the error, after looking at this code for the time I have one tends to forget that everyone doesn't have the same problem.
Thanks
S
An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.dll but was not handled in user code
Additional information: [UnexpectedHttpResponseCode]
Arguments:Not Found
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
|
Hi All,
I'm trying to create an event that the standard ListView doesn't have: fired after a vertical scroll has occured (By pressing arrow key down, arrow key up, mouse click on the vertical scroll bar or by the mouse wheel scroll).
Even when ignoring the mouse events, catching the KeyUp or KeyDown events is not good enough since it's raised before the TopItem change takes place, and not after.
An altenative can be an "TopItemChanged" event, which is raised whenever the TopItem is cahnged. I don't know how to implement this one either.
Thanks a lot!
Eyal.
|
|
|
|
|
Good Day,
If I want to check if a path is a File or Directory, I always use the Path.HasExtension function. If it have an extension, it is a file. Otherwise, it is a directory.
Just recently, I found out that this is not really effective for Files that doesn't have an extension and for directories that have an extension.
So How can I really really tell if a path is a File or a Directory?
PS: I can't use File.Exist or Directory.Exist.
Thanks!
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Well you could use...
Ian Uy wrote: PS: I can't use File.Exist or Directory.Exist.
Damn, why not?
How about
DirectoryInfo DI = new DirectoryInfo("C:\\thing");
if(DI.Exists)
else
It's exactly the same, but different
I can't think of any other way of the top of my head.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Well, the path that I am testing does not really exist. It's hard to explain.
Just think of it as a "programming exercise" given in school and you have to type a random path and tell if it is a file and a folder.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Ian Uy wrote: Just think of it as a "programming exercise" given in school and you have to type a random path and tell if it is a file and a folder.
Your teacher is a retard. If the file doesn't really exist, and you can't use the presence of extensions to tell, then there is no real solution.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
No, its not a school activity. I just made that up to simplify the matter.
Well, this is the real scenario...
I have a function that "ROLLBACKS" files and folders. I have a special routine for files and special routine for folders. Those files and folders does not exist yet, that's why I can't use the .Exists() method.
I just want a function that accepts a PATH and returns if it is a folder or file.
Sorry for the confusion.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
Ian Uy wrote: I just want a function that accepts a PATH and returns if it is a folder or file.
Not possible, for the reasons stated. Your best bet is to assume an extension means it's a file.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for your time Mr. Graus.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
As has been pointed out, there is no way to tell if a path is for a directory or file UNLESS there is a directory delimiter (slash) at the end. This isn't guaranteed by almost any function, though.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hello,
I have a main form that contains many form. When i am trying to close the main form by the X control box button, the onformclosing event of the child forms are launched before the main form event (onclosing) are launched.
How can i capte the X button closing in the mainform first?
best regards,
dghdfghdfghdfghdgh
|
|
|
|
|
The main form is closing it's children first. This is logical. I am not sure if you can do anything about it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You can check the FormClosingEventArgs in FormClosing. Allows you to cancel closing the form. I don't really know if the child forms will stay open, but it sounds logical that they will.
www.andrewvos.com
|
|
|
|
|
I have an application which generates a sine wave. when i move horizontal bar the waveform is again painting on the panel.. do to this, there is lot of flickering in the waveform..
plz do help me..
|
|
|
|
|
You can turn on double buffering,
this.SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer,true);
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I used the above code Flickering is not completely removed, still its slightly fliickering. Is there any way to Remove complete flickering of Waveform.
Whenever the form is resized or the horizontal scrollbar is moved, the waveform starts flickering.. plz do help me..
|
|
|
|
|
I create a winform by c# 2003. The form's classname like "windows.forms.app3",I must change the it to the particular name that like "myForm". Thanks for you help.
|
|
|
|
|
If you use F2 to rename the file in the solution Explorer, I think it will rename the class for you. Yo ucan also right click on the name and rename it via the refactor menu. Finally, you can just do a global search and replace.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sorry, maybe my question is not clear. The classname is not my class name. use the tools SPY++, you can find the form's classname is "windows.forms.app3". i want change it.
|
|
|
|