Thanks so much. I really appreciate you answer.I have learnt something. As I am a newcomer to programming, I think I didn't make my question clear. Actually, I want to make two applications. The first one act as a server which can send a command via the Internet to the second one to request it to play a video. The second application is nothing more than a video player with embeded video files. My question is how do I write a programme which can send a command to the other application to request it to play a video.
If I were you, I'd look into using Windows Communication Foundation (WCF). This technology is designed to let you write code that can communicate using different transports (HTTP, TCP, etc), with the same code.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
hi guys. i'm really need this .
i have a datagridview with 5 columns . i just attached my datagridview to my table in my access database what i want to do is to convert the first column from string to int , bcz it's saving as string in database and not as int .
the problem is when i hit the column header to sort the data grid viye by the first column is sorting like this .
but i want to sort it like this 1-2-6-7-8-11-55
.i think it bcz of the string format of the column do you know any way to convert the column . i think it should be fix if i convert the column from string to int or maybe it'll solve in other way .
You have a couple of choices, convert the data type in your select query or add another column either in your query or the data table resulting from the query and populate the new column with the integer value.
And as POH said don't use text speak when you are using a computer!
Never underestimate the power of human stupidity
No. How would you call it? Static constructors are called by the framework at a time which your code can't know*, and without any parameters. In fact the same construct in Java makes this clearer by just being
... so it doesn't look like a callable method (which it isn't).
(*: It's called the first time the class is fully loaded, which I think happens when a method/field/property is called. However, you still don't know when that is because some other code might use the same class.)
If you want to preload state then you can have a parameter-accepting normal static method which you call in the Main procedure or via a static constructor elsewhere. (Obviously, you could call it from anywhere, but you want to call it before you are going to use the class at all, and Main is about the only place you can guarantee that.)
Null Reference Exception?
When you select a different value in a ComboBox, the previous element gets de-selected, causing a SelectedIndexChanged event. Now, nothing is selected, the SelectedIndex is -1. Next, the element you selected gets selected, causing the next SelectedIndexChanged event. And now it is really selected, and you can use it.