Hi i wan to start an application but without showing its window
Thank you

Recommended Answers

All 12 Replies

minimise your window property on page load event

can you be precise in your question .

you can do this in several ways... You can use this.hide or like kam said minimize it at load, and there a few more ways as well. Sorry for the bad spelling and grammar but I'm on my touchpad lol


this.visible = false;

all ways of doing this will all be on load event

remove the following coding from Program.cs
Application.Run(new Form1());
Then write the code you want to execute.

thank you all for your answers but that is not what i meant i mean that i want to start a new proccess like yahoo messanger but without showing its window like its completely hidden
Thank you all again

Are you wanting to start a service? Some code that runs in the background with no visual interface?

no i dont want to start a service i just want to start an exe file in the background without showing its window

You might do well to find an API for Yahoo messenger, so you can send the messages in the background (without launching a browser or opening a window).

Of course, just sockets programming will work for sending data without being visibly detected by a normal user.

Is this what you want to do?

using System;
using System.Windows.Forms;

namespace TestForm
{
    public class Form1 : Form
    {
        public Form1()
        {
		// Keep it from showing up in Alt-Tab
		this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
		this.ShowInTaskbar = false;
        // Set start position to manual and position the window off the screen
		this.StartPosition = FormStartPosition.Manual;
        this.Location = new System.Drawing.Point(-5000, -5000);
        this.Size = new System.Drawing.Size(1, 1);

        }
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.Run(new Form1());
        }
    }
}

form1.Hide();

form1.Visible = false;

form1.Transparency = 0;

I think he wants to start an application that he isnt making without a window.

to restate what he said, as an example.

How would I start a target EXE without a window? like yahoo messenger.


There isn't a way that i'm aware of to easily start another program without displaying its window.

There isn't a way that i'm aware of to easily start another program without displaying its window.

That depends on the app. If it's a console app, the output can be reidrected.
...but that depends on the app calling it, too.

[Assuming the target is really Yahoo Messenger]
I really need to know if it is more important to start the app secretly or to send the message. If sending the message is the actual target, then let's concentrate on that.

If the only action is to secretly make someone appear online, that's a different story.

Remove code from program Main method and type loop:

while (true)
{
//your code
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.