Results 1 to 4 of 4

Thread: [RESOLVED] Process.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Resolved [RESOLVED] Process.

    Ok, i have not been sucessful at doing this, and wondred if you guys knew how. On a button click an filedialog comes up and asks the user to select an App file (.exe). Then once they select it, they are told what the its process name it would be if its running. for example if the selected Internet explorer, they would be told IExplore, i hope htis makes sense.

  2. #2
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    Re: Process.

    you will need to start the program, and then get its processName, and then kill it.

    like so (although i used an ini file :P same thing, it returns "Notepad")
    Code:
    			System.Diagnostics.Process tapp = System.Diagnostics.Process.Start("d:\setup.ini");
    			textBox1.Text = tapp.ProcessName;
    			tapp.Kill;

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Re: Process.

    Cool, thanks Phill64.

    But it owuld be

    Code:
    tapp.Kill();
    Last edited by {FPP}; Jan 27th, 2006 at 11:56 PM.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] Process.

    You would probably want to use a ProcessStartInfo object so that you can specify not to create a window.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width