|
You did not want to give path of your exe file, just give the name of it.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
na.. Its not working for me.
|
|
|
|
|
The process name is case sensitive in some case, so
try with case sensitive and check in
"Window Task Manager" whether your exe is
running or not.
If running then give the name as shown in it.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Have a look at this snippet. Just change "notepad" (which I used here) to your process name (xyz?).
List<Process> pList = new List<Process>(Process.GetProcesses());
Process pSearch = pList.Find( delegate(Process p)
{ return p.ProcessName.ToLower() == "notepad";
} );
If pSerach is null Notepad is not running, otherwise you retrieve the Process object for Notepad.
[EDIT]
Nah, just look at Process.GetProcessesByName(string) . No need to make it more complicated than that I suppose..
|
|
|
|
|
Hi,
Kindly let me know, How may I remove character from string value?
Example:
string strValue = "AP.P.LE"; // "APPLE"
I want to remove dots only
Thank you
(Riaz)
|
|
|
|
|
strValue.Replace(".", string.Empty);
is one way.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Try Replace method, and replace your dots (.) with string.Empty ("").
|
|
|
|
|
If someone has already answered why post exactly the same answer???
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Why write a rude reply to someone who also tries to help out just because the answer is almost the same?
Obviously I had not seen your reply when I wrote mine.. and really, what is your problem?
|
|
|
|
|
Calla wrote: Obviously I had not seen your reply when I wrote mine
You would say that, wouldn't you?
Calla wrote: and really, what is your problem?
You!
Okay, okay, sorry - bit pissed because it happen more than it used to: seems like people just trying to get rep points for no good reason.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
digital man wrote: You would say that, wouldn't you?
Like J4amieC wrote: They were 3 minutes apart dude...
digital man wrote: Okay, okay, sorry - bit pissed because it happen more than it used to: seems like people just trying to get rep points for no good reason.
Yes.. getting rep points is really what life is all about, isn't it?
|
|
|
|
|
Calla wrote:
Like J4amieC wrote: They were 3 minutes apart dude...
That's a lifetime.
Calla wrote: Yes.. getting rep points is really what life is all about, isn't it?
For me, no, for you... I think there are people here who see them as important though I can't see why.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
They were 3 minutes apart dude... I ofen have a page open for that sort of time without a refresh to see if other posts have been made.
Your comment would have been fine if there was 3 hrs, but 3 minutes... give a little grace.
|
|
|
|
|
I've occassionally done this when I've come to one of the forums, got distracted by a task (having possibly started an answer off), and not refreshed the browser. It has nothing to do with attempting to gain rep points (I don't really need to boost mine), and more to do with timing.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I often take a long time writing a response, doing research to ensure my answer is correct, many people can post while I'm still writing.
|
|
|
|
|
Try something like string s=Regex.Replace(<input string>,"[^\\w\\.@-]",""); .
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
Hi Riaz,
you can remove "." from a given string from the following ways:
1) Simple way :
string strValue = "This. is .test .string. that. removes the (DOT) from the. string";
strValue = strValue.Replace(".",string.Empty);
2) REGEX WAY :
string strValue = "This. is .test .string. that. removes the (DOT) from the. string";
strValue = System.Text.RegularExpressions.Regex.Replace(strValue, @"\.+", "");
please check the value of strValue ( you find that "." is removed from the given string )
3) Through Loop and replace characters:
Here for simplicity I have made a static function that will take input as a string and returns a string by replacing "."
NOTE :- To Remove all special characters including white space from the given string just uncomment the first line in below function.
public static string RemoveSpecialChars(string str)
{
string[] chars = new string[] { "." };
for (int i = 0; i &lt; chars.Length; i++)
{
if (str.Contains(chars[i]))
{
str = str.Replace(chars[i], "");
}
}
return str;
}
Now use this function anywhere to remove "." from input string . Please check below example for how to use :
string strValue = "This. is .test .string. that. removes the (DOT) from the. string";
strValue = RemoveSpecialChars(strValue );
please check the value of strValue ( you find that "." is removed from the given string )
Note :- If your purpose is to remove "." only from a given string then Simple Way is better.But If you want special characters to be removed from string then you either need REGEX or Through Loop and replace characters. For REGEX you have to find the REGEX to remove special characters.
Thanks,
Nilesh Upadhyay
|
|
|
|
|
Now that is posting 2 hrs later just for rep points.
|
|
|
|
|
HI ,
Thank you for your comment, but I have just seen this question.
I am not posting answer for any points in fact I don't even know that How the point system is calculated because I am not an active member to give answer frequently.
Sorry if my answer gives wrong information to anyone . My intention was to provide an answer with multiple ways to achieve the stated thing.
Thanks,
Nilesh
|
|
|
|
|
|
For completeness you could also include the Split/Join technique.
|
|
|
|
|
Hello To All,
I have an Image and I want to print this Image in Ellipse Area.
The Following Code i am using which print the Image of Rectangle Format.
e.Graphics.DrawEllipse(Pens.Red, rect);
e.Graphics.DrawImage(bmp, xlocation, ylocation, bwidth , bheight);
Thanks
Anubhava Dimri
If you can think then I Can.
|
|
|
|
|
See here.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
thank sir
If you can think then I Can.
|
|
|
|
|
Dear friends
i am having some clarification ..if some one can help me by explaining
1. What is the diffrence and relation ( Localization , Globalization,satellite assembly)
i have read artical about globalization , as my understanding we need to create (Folder for Language and Resource File for each language placed insaide the folder) i understand that .net environment convets thar .resx files as Resource.dll
my problem is
i have text files for each language, that has key value pair and this files need to be convered resource.dll for globalization
(note:my requirement is at any point of time User can go and edit the text file , by executing some command convet those files as resource.dll and these dll used for globalization)
in .net 2005 there is some command like
"D:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ResGen.exe" "C:\Inetpub\wwwroot\SNIF3.0\SNIF3\Web\SNIF\sniffiles\Config\Query.txt"
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\al.exe /t:lib /embed:"C:\Inetpub\wwwroot\SNIF3.0\SNIF3\Web\SNIF\sniffiles\Config\Query.resources" /out:"C:\Inetpub\wwwroot\SNIF3.0\SNIF3\Web\SNIF\sniffiles\Config\ReflectionCase.resources.dll" /title:"Queries"
How to do this in 3.5?? is this the correct way for my problem??
give me some idea? link?
Thank you
Joe
|
|
|
|