4
Answers

Hide form

namvo

namvo

20y
2.1k
1
Hello, I'd like to know how to hide the main form. I mean i don't want my application show any form, just run on the back ground. The main form doesn't have visible property, so i'm just stucked now. Please help me. Thanks for any helps.
Answers (4)
0
alobiuc

alobiuc

NA 197 0 20y
Yes, I've tried it. And i've tried it again just before posting this reply. I even wrote: this.Visible=false; Thread.Sleep(2000); this.Visible=true; and it works just fine (hides the form, waits 2 seconds, displays the form)! Maybe you should take care of the casing : "visible"!="Visible".
0
namvo

namvo

NA 8 0 20y
did you ever try that ??? I'd tried this.visible manytimes before i made a post here.
0
alobiuc

alobiuc

NA 197 0 20y
The main form sure has the Visible property: this.Visible=false;
0
namvo

namvo

NA 8 0 20y
i can only find the similiar answer on google at http://www.greatis.com/delphicb/tips/lib/application-showform.html but it's in Delphi/ c++ and in c# we don't have Application.ShowMainForm=False; my question seems to be dumb, but i do need this function for my windows service to call this app running on the background.