hi to all;
i have created a C# applicaiton Windows Forms app and i dont want it to show the Form itself.. to do this. i used in Form Load method this.Visible=false; it didnt work i used this.Hide(); again it didnt work..
then i used these codes in Initialize component method but unfortunately again didnt work..
how will i prevent my form to be seen..

hide or visible=false do not work
lk_spec
hi,
Form Load event is occured when form is being loaded. After form load event is completed, the form is shown. Even you hide the form in the Form_load event. after the event, it will show again. The hide method and visibility is worked properly. To test this, add a button to your form and in the button click event, just call hide method. You'll see it work well.
For you application, you should use a window service.
hope it'll help you,
soemoe
CodeSweatAndBeers
let me explain thus Soe..
in fact this is an FTP application
in my application i have a timer and this in every tick of this timer i check a specified file in my PC.. and if there is a change in this file.. i automatically upload it to my desired server.. to do this i do not need any user interface but to be able to see whether some things work or not i began building a user interface form. i will not get any information from the user.. it will just check my file and if there is any change it will upload it to my server..
that is why i tried hide method and visible attribute..
if u have an idea or not only u anyone else have an idea what exactly hide method and visible attribute are for and why did not they work please tell me .. i am reaaly wondering the reason..
thanks
The ZMan
JOSII
thank you for the information Soe,
i did hide the form with opacity attribute and now trying to create a setup project for my application to be able to put it on startup menu which will let it be launched as son as the PC is turnned on..
Thanks..
TMB
hi,
you can only hide after form is loaded. Form Load event is occured when form is being loaded. After form load event is complete, you can hide. (example. Activated event..)
but I wonder why you don't want to show the form . what do you want to do with this form without showing.. I think there can be other class for this.
I hope it'll help you.
soemoe
latence01
thank you very much it worked but why did not hie or visible atributes ddi not work any idea
or what are they for (hide method and Visible attribute what are these for )
Polity4h
williamlu
hi,
First just do what Ken says: Opacity = 0
If you don't want to show in the taskbar. set ShowInTaskbar = false
Now, I hope your form is totally hided.
does it help you..
cheers,
soemoe
Vasanths R
Isaac,
Glad you found you're answer, but Soe Moe is right, you should really looking into creating a windows services for something like this.