473,378 Members | 1,457 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,378 software developers and data experts.

C# How to close a process which form.ShowInTaskbar = false

I have first application opent a form Form1 nothing else.

I have second application which will find the first application process and close it.

bellow is the second application:



static void Main ()

{

System.Diagnostics.Process[] pros = System.Diagnostics.Process.GetProcesses(".");

foreach (System.Diagnostics.Process p in pros)

{

if (p.MainWindowTitle == "Form1")

{

System.Threading.Thread.Sleep(1);

p.CloseMainWindow();

}

}

}



// But after change the first program Form1.ShowInTaskbar = false

// the second program dose not work any more.
Jul 3 '07 #1
0 1162

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

Similar topics

6
by: Claus Holm | last post by:
I'm trying to enable a menuitem in the parent form from a mdichild. Rather than making the menuitems public, I'd go for a public method in the parent form to do the change, but when I call the...
19
by: Oliver Neumann | last post by:
Hello, im new to c# and i got an app with a notifyicon. Now i want to start the app only with the notifyIcon, so that the Main-Form doesnt show up. The form itself is used at the entrance...
11
by: Özden Irmak | last post by:
Hello, In my VB.Net application I create a new instance of my form like : NewForm = new MyNewForm() But with this line, this new form is automatically shown. I want it to be hidden at the...
1
by: pamelafluente | last post by:
Hi Guys, I have a small application which uses a NotifyIcon. The user can set the program so that when he clicks on the form-cancel button "X", the program will instead be minimized in the icon...
4
by: pamelafluente | last post by:
Hi Guys, I have a small application which uses a NotifyIcon. The user can set a flag (PreventClosing ) so that when he clicks on the form-cancel button "X", the program will instead be...
0
by: yasker | last post by:
Hi, I got a problem in display a sub form. My app contains two form: main and sub. I want sub form display before main form, to provide some information to it. I use a NotifyIcon to activity...
0
by: yasker | last post by:
Hi, all I'm developing an application that needs to pop up when the user presses a global hot key. I followed instruction using Win32 API RegisterHotKey. It works fine at first, but what's the...
4
by: Mike | last post by:
I have a winforms application that is hidden using the following code upon prompt: //Remove from the taskbar and also from alt+tab this.Visible = false; this.ShowInTaskbar = false;...
2
by: jp2group | last post by:
I have a Main Form that hides in the Task Bar Tray as an Icon until one of the Tray Icon's Menu Items is selected. (think of your antivirus program running there) The program starts up fine and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.