|
I want to write DCOM components,but I don't know how to write the DCOM components in C#.
P:-Dlease tell me about it!
if possibility,please give me some examples about it!
Thank you!
|
|
|
|
|
First hit[^] on a google search.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Another idiot who doesn't like it when you tell them "Google is your friend!". I hate it when people come here and expect you to hand feed them every detail they want to know! Whatever happened to programmers doing their own research?! How on earth do these people learn anything?!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
Whatever happened to programmers doing their own research?! How on earth do these people learn anything?!
Yeah, it's a worry. I used to just say 'google', now I actually give the link as well as telling them how I got it. Still, people are not happy.
But at the end of the day, it's all good news for you and me. None of the 'I can't do my own research' brigade are ever going to put us out of a job.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
None of the 'I can't do my own research' brigade are ever going to put us out of a job.
Soooo true! There is a bright side!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't know how many smack i got from Mr.Kreskowiak for this sort of spoon feeding which reflect in my answer submissions. .
Sreejith Nair
[ My Articles ]
|
|
|
|
|
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Here is the code I am using to get the total of the following textboxes
int OnHandVar1=Convert.ToInt32(OnHandRow1.Text);
int OnHandVar2=Convert.ToInt32(OnHandRow2.Text);
int OnHandVar3=Convert.ToInt32(OnHandRow3.Text);
int OnHandVar4=Convert.ToInt32(OnHandRow4.Text);
int OnHandVar5=Convert.ToInt32(OnHandRow5.Text);
int OnHandresult= OnHandVar1 + OnHandVar2 + OnHandVar3 + OnHandVar4 + OnHandVar5;
TxtOnHand.Text =Convert.ToString(OnHandresult);
actully for the other things the code is working just fine and also before it was working fine, now it is giving me an error saying that
"INPUT STRING WAS NOT IN A CORRECT FORMAT"
CAN SOMEONE PLEASE HELP ME OUT URGENT!!!!!!!!!!
Thanks,
I really appreciate your response.
Urgent
|
|
|
|
|
Zindagi11@rediffmail.com wrote:
"INPUT STRING WAS NOT IN A CORRECT FORMAT"
Gee. What do you think this might mean ? I'd guess that the input string was not in the correct format. I'd further guess that seeing as you're converting strings to numbers, that some of them were not valid numbers ( empty strings perhaps ? ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm not sure, but doesn't .NET create 0 for empty strings? Could be wrong though.
No hurries, no worries.
|
|
|
|
|
Like Christian said, the Text might be empty, or it's not a number.
<italic>Work hard, Work effectively.
|
|
|
|
|
To add on to Christian reply, your string might contain alphabets or non-digit characters. Perhaps you can run a Char.IsDigit(..) check on each characters in the string.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
How do I handle empty strings in this particular code, I will really appreciate it.
Thanks,
ZIndagi
ZIndagi
|
|
|
|
|
This handles an empty value:
int OnHandVar1;<br />
if (OnHandRow1.Text.Length == 0) {<br />
OnHandVar1 = 0;<br />
} else {<br />
OnHandVar1 = int.Parse(OnHandRow1.Text);<br />
}
If the value is not empty and not numeric, it still gives an error, though.
---
b { font-weight: normal; }
|
|
|
|
|
is there a simple way to change background color of the row, based on its value...(based on cell value in same row)
|
|
|
|
|
"Simple" is a relative term, dependant on your definition and programming skill level, compared to someone else.
You might want to take a look at this[^] article by Piero.Viano.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi there friends,
I am working on a program that its language is not english(so mine!).
every time user wants to change the language he must press ALT+SHIFT
and this is annoying.How can I change language programatically?
Thank You!
|
|
|
|
|
i have a problem where, i need to display shared folders of a specified computer in a explorer. If i give a computer name, it should display the shared folders in a explorer. I could do that through wmi queries, but it is in not explorer view. The problem has to be solved in C#.
can anybody guide me?
Amar
|
|
|
|
|
I have binary files that have delimiters inserted to indicate document breaks. I need to break apart these files into these documents in C# and save each to a binary file. How would one go about this?
|
|
|
|
|
Leo,
To do this task, if your files are binary to begin with, you will need to use this code snippet to read the file :
System.IO.FileStream <name of="" variable=""> = new System.IO.FileStream("<name of="" file="">", FileMode.Open)
System.IO.BinaryReader <name of="" variable=""> = new System.IO.BinaryReader();
That will open the document for binary reading.
To read the document and convert it to a string for splitting, add this. (br will be used for the BinaryReader)
string <name of="" string=""> = "";
foreach(byte data in br.ReadBytes((int)fs.Length))
{
<name of="" string=""> = <name of="" string=""> + new String(data);
}
string[] <name of="" array=""> = <name of="" string="">.Split("<delimiter>".ToCharArray());
That seperates the string into an array so you can write the data with this:
This is setting up the writer from a Windows forms SaveFileDialog:
for(int i = 0; i <= this.saveFileDialog1.FileNames.Size; i++)
{
BinaryWriter[] bw = new BinaryWriter(new FileStream(this.saveFileDialog1.FileNames[i], FileMode.Create))[this.saveFileDialog1.FileNames.Size];
}
Now to write the individual data:
for(int i = 0; i <= this.saveFileDialog1.FileNames.Size; i++)
{
bw[i].Write(<name of="" array="">[i]);
bw[i].Close();
}
And that should do it.
Mike Stark
|
|
|
|
|
I want to know how to check the internet port status, becuse i want to create a TCP server application that can select the port dynamic, you know not static.
For example i want to check port 1313 from ip 127.0.0.1, i want to know status (is it opened or not), if opened i want to know who is open the port. Like port scanner you know, but this for socket application.
Thank's for your comments.
|
|
|
|
|
The only thing I can think of is that you try to programatically open ports in a while loop which has a try-catch inside to try to open the socket, and catch the exception and continue the loop...You can also figure out which specific exception will fire when the port is in use and only catch that one, but let other exceptions be thrown or just catch-all and assume that it's an already open-port.
|
|
|
|
|
|
I am working on a project and need the communities help. I have searched extensively, and cannot seem to find a solution to this problem.
I need to create a very simple properties grid. It should have no headers, and simply display 2 columns with name/value pairs listed one per row.
I have created this control by deriving a custom control from the DataGrid object, and it works well, except for one thing. The columns are not resizable without including a header column to the grid.
What I need to do is be able to resize the columns by clicking on the divider between the two cells on any row of the grid. This is the same behavior as what you see in the PropertiesGrid control.
Does anyone have any suggestions on how to implement this? It seems like this should not be hard to do, yet I have been unable to find any reference on where to even begin, much less an implemented solution to this problem.
Thanks in advance for everyones time.
Scot.
|
|
|
|
|
i have some piece of info which might get you further but it's for resizing columns according to the header text size.
piece of code is:
MethodInfo methodInfo = datagrid.GetType().GetMethod("ColAutoResize", BindingFlags.NonPublic | BindingFlags.Instance);
if (methodInfo == null)
return;
for(int i=0; i
|
|
|
|