954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

start application with out a window

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

shandoosheri
Light Poster
42 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

minimise your window property on page load event

can you be precise in your question .

kamilacbe
Junior Poster in Training
77 posts since Jun 2010
Reputation Points: 10
Solved Threads: 10
 

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

lxXTaCoXxl
Posting Whiz
300 posts since Mar 2011
Reputation Points: 22
Solved Threads: 18
 

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

vimit
Newbie Poster
11 posts since Jan 2012
Reputation Points: 10
Solved Threads: 2
 

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

shandoosheri
Light Poster
42 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

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

hericles
Practically a Posting Shark
823 posts since Nov 2007
Reputation Points: 136
Solved Threads: 167
 

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

shandoosheri
Light Poster
42 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

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.

thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 

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());
        }
    }
}
BobS0327
Junior Poster
124 posts since Feb 2008
Reputation Points: 35
Solved Threads: 16
 

form1.Hide();

form1.Visible = false;

form1.Transparency = 0;

anthonyjpv
Junior Poster in Training
97 posts since Oct 2010
Reputation Points: 16
Solved Threads: 7
 

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.

Merlin33069
Junior Poster
126 posts since May 2008
Reputation Points: 10
Solved Threads: 5
 
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.

thines01
Postaholic
Team Colleague
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 

Remove code from program Main method and type loop:

while (true)
{
//your code
}
NetDeveloper
Newbie Poster
5 posts since Feb 2012
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: