Invisible form

  • Thread starter Thread starter Jose_Csharp
  • Start date Start date
J

Jose_Csharp

Hi guys, I´m trying to make a startup invisible form. I don´t want a form
with Opacity property 0. First I did the property Visible of the form to
false. It wasn´t a good idea, was too easy. Then I follow the tips of MSDN
making a new class with an instance of the form that has the logical of the
application. But it not run since I call the ShowDialog() method. Please,
can anyone gime me a tip or any web with an example? I´m a newbie.
 
Hi Miha, first thanks for your interest. Well I need an invisible form
because I don´t want any interaction with the user. First I tried to make a
windows service but I when start it is stopped in few seconds. Then I
decided to do an invisible form. Ok it's a botch solution, but it can to
run.



Miha Markic said:
Hi Jose,

Why do you need an invisible form in first place?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Jose_Csharp said:
Hi guys, I´m trying to make a startup invisible form. I don´t want a form
with Opacity property 0. First I did the property Visible of the form to
false. It wasn´t a good idea, was too easy. Then I follow the tips of MSDN
making a new class with an instance of the form that has the logical of the
application. But it not run since I call the ShowDialog() method. Please,
can anyone gime me a tip or any web with an example? I´m a newbie.
 
Hi Jose,

You don't need a form. Just change the entry point:
[STAThread]

static void Main()

{

Application.Run(new Form1());

}

Remove

Application.Run(new Form1());

to whatever code you want.


--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Jose_Csharp said:
Hi Miha, first thanks for your interest. Well I need an invisible form
because I don´t want any interaction with the user. First I tried to make a
windows service but I when start it is stopped in few seconds. Then I
decided to do an invisible form. Ok it's a botch solution, but it can to
run.



Miha Markic said:
Hi Jose,

Why do you need an invisible form in first place?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Jose_Csharp said:
Hi guys, I´m trying to make a startup invisible form. I don´t want a form
with Opacity property 0. First I did the property Visible of the form to
false. It wasn´t a good idea, was too easy. Then I follow the tips of MSDN
making a new class with an instance of the form that has the logical
of
the
application. But it not run since I call the ShowDialog() method. Please,
can anyone gime me a tip or any web with an example? I´m a newbie.
 
Back
Top