Is it possible to use a form without its being visible to user?
I'll explain: i have a form that i want to use it from another application. but the commands are using the buttons on the form which i want 开发者_StackOverflow社区it to be invisible to user (which sends messages to another target etc).
I think that you want to use the code behind of the Form
without actually showing it. You should try refactoring your code in a separate class which you can use for your purpose.
Before call other application, just hide it
Private void MakeInvisible()
{
this.Hide();
// application call code
}
Thank you
You could try to move the Form beyond the visible area of the display. E.g., set its Location to (-1024,0) Unless the user has multiple displays.
You should be using classes if you don't need to have the form invisible.
this.Opacity = 0;
this.ShowInTaskBar = false;
精彩评论