Visual Basic/VB >> how to run vb.exe file as small icon near clock on desktop

by dk » Thu, 09 Oct 2003 01:20:04 GMT

what is required to create a visual basic exe file
which will appear as a small icon
near the clock on the desktop?

the goal is when placing a mouse over the icon it
would display info from the program.

tia,
dk


Visual Basic/VB >> how to run vb.exe file as small icon near clock on desktop

by Jeff Johnson [MVP: VB] » Thu, 09 Oct 2003 01:36:45 GMT







The area you're referring to is called the "system tray," for reference.





Visual Basic/VB >> how to run vb.exe file as small icon near clock on desktop

by Veign » Thu, 09 Oct 2003 03:15:00 GMT

Actually in WinXp its now called the 'Notification Area'


--
Chris Hanscom
MVP (Visual Basic)
http://www.veign.com
Application Design Section
http://www.veign.com/information/application/info_app.html
------








how to run vb.exe file as small icon near clock on desktop

by Jeff Johnson [MVP: VB] » Thu, 09 Oct 2003 05:30:12 GMT






Hmmm. I wonder if that's the term presented only to users or if that's
intended to be the new developer term as well. I'll have to research it.

Back in the Windows 3.1 days, what we now (Win32) call the Window menu was
called the Control menu in user documentation and the System menu in
developer documentation.




how to run vb.exe file as small icon near clock on desktop

by NickD » Thu, 09 Oct 2003 06:09:19 GMT







The .NET (hey, watch where you're throwing those rocks, they almost hit me)
control is called "NotifyIcon" for adding system tray icons.. it's the new
trendy term I guess, for users and developers alike.

It does make some kind of sense (it's where you want to be notified about
stuff, like the current time or connection states or whatever) and MS is
still on the "kid gloves" bandwagon with each Windows release -- I can't be
the only one here who whenever they install the next latest and greatest OS
spends the first 30 mins after installation navigating the UI finding out
how to turn OFF all the new "user friendly" features so that things stay
where you would expect them to be.

In fact, that seems to be the normal trend for every non-first time user
I've known doing a Micrsoft OS upgrade, but I'm rambling.

Regards,
Nick




how to run vb.exe file as small icon near clock on desktop

by Stephen J Whiteley » Thu, 09 Oct 2003 06:13:01 GMT

How about 'that place where all the stuff goes with bubbles that pop up'...









how to run vb.exe file as small icon near clock on desktop

by Rick Mogstad » Thu, 09 Oct 2003 06:17:23 GMT










The API is, (and has always been as far as i know) been called "Shell_NotifyIcon", so it wouldnt
be so wierd for the control to be called that.





how to run vb.exe file as small icon near clock on desktop

by Steven Burn » Thu, 09 Oct 2003 06:27:00 GMT

"How about 'that place where all the stuff goes with bubbles that pop
up'..."

hehe

Steven Burn
Ur I.T. Mate Group CEO
www.it-mate.co.uk

Disclaimer:
My advice is provided on an 'as-is' basis. Just because I tell you
something, does not mean I am right.




up'...




was




how to run vb.exe file as small icon near clock on desktop

by Adam D. Barratt » Thu, 09 Oct 2003 06:31:12 GMT

In article < XXXX@XXXXX.COM >, "Jeff Johnson [MVP: VB]"
< XXXX@XXXXX.COM > wrote in microsoft.public.vb.general.discussion:



Well, the API function most often used in relation to the `system tray'
is called Shell_NotifyIcon, and uses a structure called
`NOTIFYICONDATA', with messages and flags using prefixes of `NIM_' and
`NIF_' respecitvely. That's been the case since Windows 95.

The equivalent functionality is also referred to as the `Notification
Area' in at least one non-Windows GUI environment (Gnome 2.2, to be
precise).


Some of us still call it the System Menu. :)

Adam
--
The computer should be doing the hard work. That's what it's paid to do,
after all.
-- Larry Wall in < XXXX@XXXXX.COM >


how to run vb.exe file as small icon near clock on desktop

by Jeff Johnson [MVP: VB] » Thu, 09 Oct 2003 07:15:06 GMT






Here's some REALLY interesting information from the documentation of the
Shell_NotifyIcon() function in MSDN (both current and October 2001):

Shell_NotifyIcon

Sends a message to the taskbar's status area.
[...]
Remarks
The taskbar notification area is sometimes erroneously called the
"tray."

Other parts of the documentation use "status area," "taskbar notification
area," and "taskbar" interchangeably.

I've heard the term "system tray" since Windows 95 was introduced. I have
some old MSDN libraries. I may just install them on another machine and see
if Microsoft ever "officially" used that term.




how to run vb.exe file as small icon near clock on desktop

by Rick Mogstad » Thu, 09 Oct 2003 07:24:02 GMT

Perhaps it was erroneously called that, because they called the class for that window
"TrayNotifyWnd"










Similar Threads

1. Deploying URL Shortcut icons to desktop to run in own process

2. Trouble with retrieving "small" (16x16) icon, from "icon resource"

hi gang,

I am attempting to retrieve a small icon from an app.

The "icon resource" contains TWO icons, a standard 32x32 icon, and a smaller
version which is 16x16.

If I retrieve the icon using vb, and store it in a 16x16 image box, it
renders perfectly, (although I confess I don't know whether vb is retrieving
the 32x32 icon and just shrinking it, _OR_ picking out the 16x16 icon
because it fits the size of the image box more exactly).

However, if I retrieve the icon using the api, then the icon looks messy at
16x16 (but looks perfect at 32x32).  Here is the code I am using:

  hInst = LoadLibrary(sDLL)
  hTitleIco = LoadImage(hInst, MAKEINTRESOURCE(1), IMAGE_ICON, 16,16,
LR_LOADTRANSPARENT)

This DOES return a 16x16 icon, BUT it looks like the api did a sloppy job
shrinking the 32x32 icon, rather than retrieving the (nicer-looking) 16x16
version.

As I understand it, an "icon resource" can contain icons of various
dimensions, (e.g., 48x48, 32x32, 24x24, 16x16).

O.K. here's the question.  If there is an icon resource containing two (or
more) versions of an icon, how do I retrieve (with api calls) the one I
want?

tiafah, jw


3. Extracting icons from dll and exe files VB.NET

4. Extracting Icons from exe or dll files in VB.NET

how can I extract an icon from a fil
for example this sentence

"F:\WINDOWS\System32\shell32.dll,3"

how can I extract icon nr 3 from the shell32.dll??


I found some code for VB6 that might have worked in VB6, but it's been
changed in VB.NET, it was some API-calls, and drawing on compononts using
the hDC property, but the hDC property has been deleted in the PictureBox,
and I haven't found it in other components neither.
But it's got to be possible to do in VB.NET

Please help, I can't seem to figure it out.
regards Richard




5. Can I have more than one Icon in an vb-exe file - Visual Basic

6. Make exe Run even the desktop lock

Background : I have an application which will find the window name, if I lock 
the desktop in Win2k Nt m/c the exe not working. I don't logoff the machine 
only lock the m/c. kindly suggest me to run the exe even in the destop lock 
mode

Thanks in advance

Christopher

7. Hide Desktop Icons not Desktop - Visual Basic/VB

8. app icon colour different to desktop icon colour

i've added an icon to an app i've written. when a shortcut is added to
the desktop the icon colour is as expected. hwoever, when i run the
app, both the taskbar icon and the icon on the app lose colour.

if you need further details please ask.

i've searched for an answer on numerous occasions but cannot find
anything.

your help would be greatly appreciated.