Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Tray Info Message


8 replies to this topic

#1 friiks

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 53 posts
  • Gender:Male
  • Location:Latvia
  • Interests:Interests...hmm...I'd say coding SnowMoon (The new and sexy community site ;]), play my guitar and make music with it...and sometimes watch a good movie or two...

Posted 12 February 2008 - 02:44 PM

Hi!

I'm doing VB for some time now and for last two days I've been looking for a tutorial which would show me how to create some kind of notification that would pop up from lower-right side of my screen, where the clock is... you know, just like.. when a contact comes online on MSN etc.

I realized that there's no way to make a balloon pop up like the one in the image but is there a way to make anything like that..it doesn't have to be a balloon. A little square in the right spot would be good as well :o

Posted Image

Thanks in advance, Matt.

#2 imbibe

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 67 posts
  • Location:Den

Posted 12 February 2008 - 05:22 PM

Are you doing this with VB.NET or VB6. This thing is possible with both. in VB6 you need to call the Windows API & in .NET this functionality is in-built.

#3 friiks

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 53 posts
  • Gender:Male
  • Location:Latvia
  • Interests:Interests...hmm...I'd say coding SnowMoon (The new and sexy community site ;]), play my guitar and make music with it...and sometimes watch a good movie or two...

Posted 12 February 2008 - 06:30 PM

I'm using VB6...
I couldn't find a way on how to do it with API o_O

#4 imbibe

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 67 posts
  • Location:Den

Posted 13 February 2008 - 04:52 PM

I am attaching a control that you can study to place an icon in the tray area that show tooltips.
So you can provide notification. The screenshot you posted has ballon tips. I will see if I can do it & will do a Tutorial if possible.
If you can't understand the code then I'll try to do the Tutorial tomorrow.

Attached File  TrayArea.txt   3.94K   12 downloads

#5 friiks

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 53 posts
  • Gender:Male
  • Location:Latvia
  • Interests:Interests...hmm...I'd say coding SnowMoon (The new and sexy community site ;]), play my guitar and make music with it...and sometimes watch a good movie or two...

Posted 13 February 2008 - 05:02 PM

Thanks! :P
I'll try to understand it...
Looks kinda hard though :S

#6 friiks

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 53 posts
  • Gender:Male
  • Location:Latvia
  • Interests:Interests...hmm...I'd say coding SnowMoon (The new and sexy community site ;]), play my guitar and make music with it...and sometimes watch a good movie or two...

Posted 14 February 2008 - 12:51 PM

Oooh, could you please make a tutorial or explain by showing an example maybe ?

#7 imbibe

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 67 posts
  • Location:Den

Posted 15 February 2008 - 03:16 PM

Sorry, I don't have the time to make the tutorial. I used that code in one of my projects. I am attaching that project to help you out.

Actually I wrapped that code in a control. You only need to set a few properties like the ICON to be displayed in the notification area, the TOOLTIP etc. You can then handle the LEFT-MOUSE-CLICK or RIGHT-MOUSE-CLICK events on the ICON (in the notification area).

Attached File  Wall_xp.zip   15.03K   14 downloads

#8 calvin-w

    Newbie

  • Kontributors
  • Pip
  • 3 posts

Posted 12 June 2008 - 08:29 AM

[/code]Dim nid As NOTIFYICONDATA ' trayicon variable

'----------------------
'--- command1 click ---
'----------------------
Private Sub Command1_Click()
minimize_to_tray
End Sub

'------------------------
'--- create tray icon ---
'------------------------
Sub minimize_to_tray()
Me.Hide
nid.cbSize = Len(nid)
nid.hwnd = Me.hwnd
nid.uId = vbNull
nid.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
nid.uCallBackMessage = WM_MOUSEMOVE
nid.hIcon = Me.Icon ' the icon will be your Form1 project icon
nid.szTip = "Calvin-w" & vbNullChar
Shell_NotifyIcon NIM_ADD, nid
End Sub








'---------------------------------------------------
'-- Tray icon actions when mouse click on it, etc --
'---------------------------------------------------
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim msg As Long
Dim sFilter As String
msg = x / Screen.TwipsPerPixelX
Select Case msg
Case WM_LBUTTONDOWN
Me.Show ' show form
Shell_NotifyIcon NIM_DELETE, nid ' del tray icon
Case WM_LBUTTONUP
Case WM_LBUTTONDBLCLK
Case WM_RBUTTONDOWN
Case WM_RBUTTONUP
Me.Show
Shell_NotifyIcon NIM_DELETE, nid
Case WM_RBUTTONDBLCLK
End Select
End Sub

'------------------------------
'--- form Actions On unload ---
'------------------------------
Private Sub Form_Unload(Cancel As Integer)
Shell_NotifyIcon NIM_DELETE, nid ' del tray icon
End Sub[code]


#9 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 16 December 2008 - 07:47 PM

Tray info messageTray Info Message

Did you ever find a answer to your question?

 

Hi!I'm doing VB for some time now and for last two days I'veBeen looking for a tutorial which would show me how to create some kindOf notification that would pop up from lower-right side of my screen,Where the clock is... You know, just like.. When a contact comes onlineOn MSN etc.I realized that there's no way to make a balloon popUp like the one in the image but is there a way to make anything likeThat..It doesn't have to be a balloon. A little square in the rightSpot would be good as well :PPosted ImageThanks in advance, Matt.

-question by George




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users