473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

redirecting error of an external application to a form

ok i want to write a c# program for rapidshare ,the purpose of this program is to restart rapidshare when it raises an error message,(that i cant get rid off.)so i need to put a handle on the rapidshare download manager and as soon as rapidshare raises the error message,the application should close rapidshare and relaunch it again.so i want to know how to put a handle on the rapidshare program so that i can take the appropriate action
this is a code i wrote,i got the name of the program that is rapidshare
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime;
using System.Runtime.InteropServices;

namespace WindowsApplication1
{
public partial class Form1 : Form
{

public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
runningpro();

}
public void runningpro()
{
string name; int i = 0;

Process[] proc;
proc = Process.GetProcesses();
foreach (Process procs in proc)
{
name = procs.ProcessName;
procs.Refresh();


if (name == "RapidShareManager")
{

MessageBox.Show("rapidshare is open is open");

}}
}

private void button1_Click(object sender, EventArgs e)
{
runningpro();

}

}
}
Mar 8 '08 #1
0 626

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ahmad Hosseinzadeh | last post by:
Hello, I’m trying to run an external program in my application. Both are coded in python. I need to write an independent module that is used in the main application. Its responsibility is to...
1
by: Gerrit Hulleman | last post by:
Is it possible to redirect the standard input for an external application? Something like: ifstream in (...); std::streambufx oldbuf = cin.rdbuf(in.rdbuf()); system(...); cin.rdbuf(oldbuf); ...
2
by: Robert Oschler | last post by:
I am working on a PHP 4 app that interacts with an external authorization server. The external server does "third-party" authorization of users. So I do the following: 1) Each of my PHP scripts...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
2
by: jerry | last post by:
Using VB.net standard 2003. While in development environment can create process to execute an external EXE program and redirect output to "file.txt" using System.Diagnostic.Process.Start. If I...
3
by: Dennis | last post by:
I start my applicaiton from sub Main as follows: <STAThread()>Public Sub Main() Dim MainForm As frm_Main = New frm_Main Application.Run(MainForm) End Sub In the MainForm, I show a Progress...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
1
by: Lincoln Yeoh | last post by:
Hi, I've just started to learn python (I've been using perl for some years). How do I redirect ALL stderr stuff to syslog, even stderr from external programs that don't explicitly change their...
1
by: JasonT | last post by:
Hi. I have created a dll in VC++ 08 that exports a CLR windows form class. I call into this dll from an external (closed source, third-party) application to instantiate the form and embed it into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.