User Profile

Collapse

Profile Sidebar

Collapse
Bassem
Bassem
Last Activity: Jan 12 '16, 10:43 AM
Joined: Dec 26 '08
Location: Helwan, Cairo, Egypt
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Bassem
    replied to run command prompt
    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.
    See more | Go to post

    Leave a comment:


  • Bassem
    started a topic run command prompt

    run command prompt

    Hi

    I'm trying to run a simple command prompt "help". But the command prompt opens and no command runs!

    Code:
    string strCmdText;
    strCmdText = "help";
    System.Diagnostics.Process.Start("CMD.exe", strCmdText);
    I appreciate your help.
    See more | Go to post

  • 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:
    Code:
    List<string> log = new List<string>();
    log.ForEach(logName =>
    {
       if (logName == name)
       {
          found.Add(actualName.Replace("\"", string.Empty));
          break;//return;
       }
    });
    I know that the ForEach accepts a Method so I tried...
    See more | Go to post

  • I found the solution: Warping the argument with quotations.
    Code:
    myProcess.Argument = "\"" + myArgument + "\"";
    Hoping this would help someone.

    Thanks,
    Bassem
    See more | Go to post

    Leave 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
    See more | Go to post

  • Bassem
    started a topic How to debug two projects in the same solution

    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
    See more | Go to post

  • Hi,

    Try this:
    Code:
    foreach (DataGridViewRow row in dataGridViewBatch.SelectedRows)
    {
        bool alive = Convert.ToBoolean(row.Cells[0].Value);
        string fileName = row.Cells[1].Value.ToString();
    }
    Thanks,
    Bassem
    See more | Go to post

    Leave 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);
    ...
    See more | Go to post

  • Bassem
    replied to Get the complete URL from the WebBrowser
    in XAML
    Thank you Curtis for your reply.

    The Source property does not give me the query string!

    Thanks again.
    See more | Go to post

    Leave a comment:


  • Bassem
    started a topic Get the complete URL from the WebBrowser
    in XAML

    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...
    See more | Go to post
    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

  • Bassem
    replied to How to connect two databases on two hosts?
    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...
    See more | Go to post

    Leave a comment:


  • Bassem
    started a topic How to connect two databases on two hosts?

    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!
    See more | Go to post

  • Thanks a lot Curtis, I will go with Nullsoft because it is open-source.
    See more | Go to post

    Leave a comment:


  • Christian Binder, excellent answer. Thanks, I learned something new :-)
    See more | Go to post

    Leave a comment:


  • Hello,

    The DownloadFileAsy nc Method has +1 overload. Take a look into it.
    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.
    Now you can distinguish between any number of tasks (or type of files in your case)....
    See more | Go to post
    Last edited by Bassem; Nov 2 '10, 07:59 AM. Reason: Bolding ;-)

    Leave a comment:


  • Bassem
    replied to What is the ASCII reference for §?
    Hi, look at this line:
    Code:
    MessageBox.Show(Convert.ToInt32('§').ToString());
    It gives me 167! But why don't you use Split('§')?
    See more | Go to post

    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
                    {
    ...
    See more | Go to post

    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...
    See more | Go to post

    Leave a comment:


  • Bassem
    replied to Save and load user settings?
    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....
    See more | Go to post

    Leave a comment:


  • Bassem
    replied to Save and load user settings?
    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.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...