Thank you r035198x. But I wanted to run a regular console window that users can interact with from outside my application.
I found that sending a command as an argument to "cmd.exe" does not mean that it should execute it. We have to lead the command with one of these instructions:
/c means execute then terminate.
/k means execute and wait for a user input.
User Profile
Collapse
-
run command prompt
Hi
I'm trying to run a simple command prompt "help". But the command prompt opens and no command runs!
I appreciate your help.Code:string strCmdText; strCmdText = "help"; System.Diagnostics.Process.Start("CMD.exe", strCmdText); -
How to add a break statement in a foreach lambda expression
Hello,
I want to break a ForEach() Method of a List that accepts a lambda expression based on a condition:
I know that the ForEach accepts a Method so I tried...Code:List<string> log = new List<string>(); log.ForEach(logName => { if (logName == name) { found.Add(actualName.Replace("\"", string.Empty)); break;//return; } }); -
I found the solution: Warping the argument with quotations.
Hoping this would help someone.Code:myProcess.Argument = "\"" + myArgument + "\"";
Thanks,
BassemLeave a comment:
-
How to pass special character to a process argument
Hello,
How can I pass ":" or " " as an argument to a process?
I start a process which takes an IP and port number (ex 222.240.224.131 :80) as argument. Another character that I want to pass is white space character. Both of these characters cuts the argument string and sends only the part that leads them.
Thanks,
Bassem -
How to debug two projects in the same solution
Hello,
My solution contains two projects. The first one starts a process, its file name is the second one "exe" file.
How can I debug the second project where it is started as a process by the first one? I tried to use the "vshost.exe " as the file name but it didn't work.
Thanks,
Bassem -
Hi,
Try this:
Thanks,Code:foreach (DataGridViewRow row in dataGridViewBatch.SelectedRows) { bool alive = Convert.ToBoolean(row.Cells[0].Value); string fileName = row.Cells[1].Value.ToString(); }
BassemLeave a comment:
-
How to create a WebKitBrowser dynamically and fire DocumentCompleted
I'm using WebKit to navigate to a URL then use it's HTML contents using WebBrowserDocum entCompletedEve ntHandler. It works when drag-drop the control onto the form. But when I try to dynamically create the WebKitBrowser it does not fire the DocumentComplet ed event. So I think it does not navigate at all.
...Code:WebKitBrowser br = new WebKitBrowser(); br.Name = "browser"; br.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(br_DocumentCompleted);
-
Thank you Curtis for your reply.
The Source property does not give me the query string!
Thanks again.Leave a comment:
-
Get the complete URL from the WebBrowser
Hi,
How can I get the complete URL from the webbrowser?
Thanks for your help!
Bassem
update:
I use the WebBrowser to get a query value when it navigates to a page and the page redirect it with a url that contains the query.
In the Windows Forms control I check the URL property of the WebBrowser in the Navigated event handler.
How can I proceed the same...Last edited by Niheel; Jun 21 '11, 06:32 PM. Reason: when adding info to a question, best to edit the question to add details -
Thanks a lot dgreenhouse for your help!
I'm trying to create a program to do the copying on a condition for more than one time where the source is updated every while.
In more details:
1. There is database#1 has table#1 where data is inserted every moment.
2. There is database#2 has table#2.
3. I wan to copy some fields from db#1 tbl#1 to db#2 tbl#1. Not only for one time but will do again for the new data...Leave a comment:
-
How to connect two databases on two hosts?
Hello,
How can I connect two databases on two different host? I'm trying to copy some data from a table#1-database#1 to table#1-database#2.
Thanks in advanced! -
Thanks a lot Curtis, I will go with Nullsoft because it is open-source.Leave a comment:
-
Christian Binder, excellent answer. Thanks, I learned something new :-)Leave a comment:
-
Hello,
The DownloadFileAsy nc Method has +1 overload. Take a look into it.
Now you can distinguish between any number of tasks (or type of files in your case)....Code:public void DownloadFileAsync(Uri address, string fileName, object userToken); // userToken: // A user-defined object that is passed to the method invoked when the asynchronous // operation completes.Leave a comment:
-
Hi, look at this line:
It gives me 167! But why don't you use Split('§')?Code:MessageBox.Show(Convert.ToInt32('§').ToString());Leave a comment:
-
I don't think there is a built in Method in the .NET framework will completely do that. So, you will have to build one of your own.
...Code:public int[] ConvertStringIntoIntArray(string numberRepresenter) { List<int> arrayOfInt = new List<int>(); foreach (char n in numberRepresenter) { try {Leave a comment:
-
Curtis,
This is a great piece of information, I never knew that. Could you please tell me a name of a third party?
Thanks...Leave a comment:
-
I pointed you to the simplest way to do your task. I think you would take less than 1 day to learn it and use it.
Here is a good start:
Introduction to LINQ - Simple XML Parsing
I just googled for 1 minute to get that link. You can find a lot of tutorials....Leave a comment:
-
Fuzz13,
Use XML, and use LINQ to XML to manipulate the file. This would be the best way but according to your needs you should go.
Subin Ninan,
The link is broken. I think it is better to post the actual link, not the redirect one.Leave a comment:
No activity results to display
Show More
Leave a comment: