Should be one line of code, but MSDN Library doesn't seem to address it that I can find...maybe because it's so dead simple, any dork could figure it out.
I just want a button click event to minimize the app to system tray and keep running in the background.
Probably as simple as Me.MinimizeToTray or something stupid.
That's the second time you've referred to the old VB6, but I've never used any VB in my life, I am completely new to programming. I come from an HTML background. When I said n00b, I meant it in the truest form.
So I'll goof around with the NotifyIcon a bit. It's definitely a start.
I was only referring how hard it "used" to be in VB6. Now with.NET its as simple as dragging and
dropping the NotifySysTray object from the toolbox to your form.
Then in the minimize of the form you set the notifyicon to visible. Not hard at all.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Disneyland, KnottsBerry Farm, Magic Mountain many many times.
Santa Monica is usually too polluted or cold, I like OC beaches better
Hollywood: Crused the Blvd back in the day (nothing but freaks now), Universal City Walk several times.
California Speedway (Nascar), Dodger stadium, Anaheim Angeles Staduim (which my company is directly accross the street from).
Las Vegas (only 265 miles away) many many times.
San Francisco - last summer.
Maui (Hawaii) - 1 1/2 years ago
Most within the past 2 years.
But I mostly enjoy driving to/from work with the top down from the Spring to the Fall.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Hi all!
Quick Question regarding the Tray Icon.
I tryed it out as well but useing an existing program.
Also, instead of using the minimize Box I'm using a button. I have noticed that when Minimizing my App. there is still part of the title bar visible just over the windows start button.
Would you care to explain why that is??
Thats because you need to set the form's visibility to False when its minimized to the systray. Then when
the icon is double-clicked or ? you restore the form and set the visibility back to True.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
kulrom, I was referring to RobDog with the VB6 comment, not you; sorry for the confusion.
Rob - thanks for the sample code...I'll see how I can work it in. I need it to apply both to the minimize button AND a normal button, so I'll start with what you sent.
thx,
I found out how to use the NotifyIcon, a little bit back no real use of it yet, cause all the examples i found were add a button here to make it happen, and i wanted it to work with the minimize form btn, then i found your example and it works like a charm thx alot man.