Hide the form when application starts ??

night_prince

Member
Joined
Dec 17, 2006
Messages
24
Programming Experience
Beginner
hi every body :)
i want to make an application which works in background and puts an icon
in the notify area next to the clock.
what i want is how to hide the form before it appears ,i tried this :

sub form_load(..) handles form1.load

me.hide()

end sub

but unfortunately it didn't work, i tried also the resize event and activate ...
but nothing happens. :confused:
 
This is one of the classic questions, search the web and you will find this questions asked a million times and just about no answers. Why not set window as minimized on startup and hide it after start and don't bother if it shows for split second in task bar?
 
You should be able to set WindowState = Minimized and ShowInTaskbar = False. This should prevent it from displaying the form and displaying on the taskbar.

That's what happened for me when I tested it.

CT
 
Thanks John and Cavar
i've already done that, but i'm just trying to find a professional solutoin
so look like there is not :(
thank you all pals.
 
Actually when I did WindowState and ShowInTaskBar now it didn't show anything intermediary, perhaps this PC is faster than the previous? perhaps they changed something from Framework 1.1 to 2.0? Did you try it night_prince?
 
Thanks John and Cavar
i've already done that, but i'm just trying to find a professional solutoin
so look like there is not :(
thank you all pals.

I'm not sure what's unprofessional about the method I described. :confused:

You never see the form or anything in the taskbar when starting the app, at least on my dev machines. Now maybe if the user has a super slow PC, but I can't test that, since my PC's are fairly new, sorry.

I can't think of any other methods than the ones we described.

CT
 
I have a really slow computer: 1.6GHz, 512Mb RAM. I would hope that very few people have a slower computer than that.
This is the same setup I use for a similar app that shows only a NotifyIcon (WindowState = Minimized and ShowInTaskbar = False). I see nothing at all when the app starts. There's nothing unprofessional about it.
 
ok
i must admit that it's not a bad idea to set window state to minimized and
ShowinTaskbar to false
in fact i've not tried that :)
but what in my mind is :
to make an application that start with a Sub Main () not a form,but since you can't make an application starts with a (sub main ) and Notify Icon
so i decided to start with invisible Form and a notify icon whose job is to show the form.

in the result i'll try the mentioned solution.
at the end i'm very surprised of that proplem (ME.hide).

thank you all any way.
bye bye
 
Hi.

Just a question on this subject : what about using a windows service with notifyicon having a contextmenu that enable user to start the windows form application ?

In one word : what's the rigth way ?

Regards.
 
Windows Services don't have graphical user interfaces.
 
Hi.

I know that, the idea is to launch another application in charge of the user interface (As AVG or ZoneAlarm do for example).

Regards.
 
Back
Top