Flype UserLibraries for PureBasic 4.0

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Thanks!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

:? About PureXLS, any form to set an Auto-Filter with PureXLS_Style or other method?
-----
Solved!

Code: Select all

 PureXLS_WriteString(id, "<AutoFilter x:Range="+Chr(34)+"R3C1:R3C11"+Chr(34)+" xmlns="+Chr(34)+"urn:schemas-microsoft-com:office:excel"+Chr(34)+">" )
  
PureXLS_WriteStringN(id, "</AutoFilter>")
PB 6.21 beta, PureVision User
jpd
Enthusiast
Enthusiast
Posts: 167
Joined: Fri May 21, 2004 3:31 pm

SysTrayIcon library...

Post by jpd »

Hi Flype,

at first thank for the nice library SysTrayIcon.

In one of my project I need to use unicode

and the SysTrayIconBalloonEx2 procedure not works,

I'm analyzed the code and found out that you use

byte value on the NOTIFYICONDATA Structure

if you use character value

then the structure size not have a fix value on boot case ANSI/Unicode


and this constant are not ready anymore

#NOTIFYICONDATA_V1_SIZE = 88 ; 95+
#NOTIFYICONDATA_V2_SIZE = 488 ; 2000+
#NOTIFYICONDATA_V3_SIZE = 504 ; XP+

you need to use sizeof(NOTIFYICONDATA_95) for #NOTIFYICONDATA_V1_SIZE
and

sizeof(NOTIFYICONDATA_2k) for #NOTIFYICONDATA_V2_SIZE

and
sizeof(NOTIFYICONDATA_XP for #NOTIFYICONDATA_V3_SIZE


Best
jpd

here the changed file...
SysTrayIconRes.pb:

Code: Select all


;-----------------------------------------------------------
;- Object:   NotifyIcon UserLibrary
;- Version:  1.1, May 2006
;-           
;- Requir.:  PureBasic 4.0
;-           TailBite 1.3 PR 1.0
;-           
;- Author:   flype - flype@altern.org
;-           
;- Descr.    Microsoft SHELL_NOTIFYICON
;-           Functions for Systray Icon (shellapi.h)
;-----------------------------------------------------------


;-----------------------------------------------------------
; Constants
;-----------------------------------------------------------

Enumeration ; #WM
  #WM_USER       = $400
  #WM_NOTIFYICON = $400 + $7258
EndEnumeration
Enumeration ; #NIF
  #NIF_MESSAGE = $01 ; 95+
  #NIF_ICON    = $02 ; 95+
  #NIF_TIP     = $04 ; 95+
  #NIF_STATE   = $08 ; 95+
  #NIF_INFO    = $10 ; 2000+
  #NIF_GUID    = $20 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIIF
  #NIIF_NONE      = $00 ; 2000+
  #NIIF_INFO      = $01 ; 2000+
  #NIIF_WARNING   = $02 ; 2000+
  #NIIF_ERROR     = $03 ; 2000+
  #NIIF_USER      = $04 ; XPSP2+
  #NIIF_ICON_MASK = $0F ; XP+ Reserved
  #NIIF_NOSOUND   = $10 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIM
  #NIM_ADD        = 0 ; 95+
  #NIM_MODIFY     = 1 ; 95+
  #NIM_DELETE     = 2 ; 95+
  #NIM_SETFOCUS   = 3 ; 2000+
  #NIM_SETVERSION = 4 ; 2000+
EndEnumeration
Enumeration ; #NIN
  #NINF_KEY             = 1
  #NIN_SELECT           = $400
  #NIN_KEYSELECT        = $401
  #NIN_BALLOONSHOW      = $402 ; XP+
  #NIN_BALLOONHIDE      = $403 ; XP+
  #NIN_BALLOONTIMEOUT   = $404 ; XP+
  #NIN_BALLOONUSERCLICK = $405 ; XP+
EndEnumeration
Enumeration ; #NIS
  #NIS_HIDDEN     = 1 ; 2000+
  #NIS_SHAREDICON = 2 ; 2000+
EndEnumeration

  #NOTIFYICON_VERSION     = 3   ; 2000+


Structure NOTIFYICONDATA_95
  cbSize.l
  hwnd.l 
  uID.l 
  uFlags.l 
  uCallbackMessage.l 
  hIcon.l 
  szTip.c[64] 
EndStructure 
Structure NOTIFYICONDATA_2K Extends NOTIFYICONDATA_95
  szTipEx.c[64] 
  dwState.l
  dwStateMask.l 
  szInfo.c[256] 
  StructureUnion 
  uTimeout.l 
  uVersion.l 
  EndStructureUnion 
  szInfoTitle.c[64]
  dwInfoFlags.l
EndStructure 
Structure NOTIFYICONDATA_XP Extends NOTIFYICONDATA_2K
  guid.GUID
EndStructure 


and the file SysTrayIconEx.pb:

Code: Select all

;------------------------------------------------------------------------------------------------
;- Object:   SysTrayIconEx UserLibrary
;- Version:  1.0, May 2006
;- Author:   flype - flype@altern.org
;- Requir.:  PureBasic 4.0 / TailBite 1.3 PR 1.2
;------------------------------------------------------------------------------------------------


;EnableExplicit


IncludeFile "C:\code\UserLib_PB40_SysTrayIconEx\UserLib_PB40_SysTrayIconEx\Source\\SysTrayIconRes.pb"


;------------------------------------------------------------------------------------------------
; AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l [, tip.s])
; RemoveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
; HideSysTrayIconEx(uID.l, hWindow.l, state.l)
; SetActiveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l [, flags.l]) 
;------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 95+
;------------------------------------------------------------------------------------------------

ProcedureDLL.l AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l)
  
  Protected nid.NOTIFYICONDATA_95
  
  nid\cbSize           = SizeOf(NOTIFYICONDATA_95)
  nid\uID              = uID
  nid\hwnd             = hWindow
  nid\hIcon            = hIcon
  nid\uFlags           = #NIF_MESSAGE | #NIF_ICON
  nid\uCallbackMessage = #WM_NOTIFYICON
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
  
EndProcedure
ProcedureDLL.l AddSysTrayIconEx2(uID.l, hWindow.l, hIcon.l, tip.s)
  
  Protected nid.NOTIFYICONDATA_2K
  
  nid\uID              = uID
  nid\hwnd             = hWindow
  nid\hIcon            = hIcon
  nid\uFlags           = #NIF_MESSAGE | #NIF_ICON | #NIF_TIP
  nid\uCallbackMessage = #WM_NOTIFYICON
  
  If OSVersion() >= #PB_OS_Windows_2000
    PokeS(@nid\szTip, tip, 128)
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    PokeS(@nid\szTip, tip, 64)
    nid\cbSize = SizeOf(NOTIFYICONDATA_95)
  EndIf
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
  
EndProcedure
ProcedureDLL.l RemoveSysTrayIconEx(uID.l, hWindow.l)
  
  Protected nid.NOTIFYICONDATA_95
  
  nid\cbSize = SizeOf(NOTIFYICONDATA_95)
  nid\uID    = uID
  nid\hwnd   = hWindow
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_DELETE, @nid)
  
EndProcedure
ProcedureDLL.l SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
  
  Protected nid.NOTIFYICONDATA_2K
  
  nid\uID    = uID
  nid\hwnd   = hWindow
  nid\uFlags = #NIF_TIP
  
  If OSVersion() >= #PB_OS_Windows_2000
    PokeS(@nid\szTip, tip, 128)
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    PokeS(@nid\szTip, tip, 64)
    nid\cbSize = SizeOf(NOTIFYICONDATA_95)
  EndIf
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
  
EndProcedure


;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 2000+
;------------------------------------------------------------------------------------------------

ProcedureDLL.l HideSysTrayIconEx(uID.l, hWindow.l, state.l)
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_2000
    
    nid\cbSize      = SizeOf(NOTIFYICONDATA_2K)
    nid\uID         = uID
    nid\hwnd        = hWindow
    nid\uFlags      = #NIF_STATE
    nid\dwStateMask = #NIS_HIDDEN
    
    If state
      nid\dwState = #NIS_HIDDEN
    EndIf
    
    ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid) 
    
  EndIf
  
EndProcedure
ProcedureDLL.l SetActiveSysTrayIconEx(uID.l, hWindow.l)
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_2000
    
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
    nid\uID    = uID
    nid\hwnd   = hWindow
    
    ProcedureReturn Shell_NotifyIcon_(#NIM_SETFOCUS, @nid) 
    
  EndIf
  
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l) 
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_XP
    nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
  ElseIf OSVersion() >= #PB_OS_Windows_2000
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    ProcedureReturn #False
  EndIf
  
  nid\uVersion = #NOTIFYICON_VERSION 
  Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
  
  nid\uID         = uID
  nid\hwnd        = hWindow
  nid\dwInfoFlags = #NIIF_INFO
  nid\uFlags      = #NIF_INFO
  nid\uTimeout    = timeOut
  
  PokeS(@nid\szInfo, message, 256) 
  PokeS(@nid\szInfoTitle, title, 64)
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid) 
  
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx2(uID.l, hWindow.l, title.s, message.s, timeOut.l, flags.l) 
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_XP
    nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
  ElseIf OSVersion() >= #PB_OS_Windows_2000
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    ProcedureReturn #False
  EndIf
  
  nid\uVersion = #NOTIFYICON_VERSION 
  Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
  
  nid\uID         = uID
  nid\hwnd        = hWindow
  nid\dwInfoFlags = flags
  nid\uFlags      = #NIF_INFO
  nid\uTimeout    = timeOut
  
  PokeS(@nid\szInfo, message, 256) 
  PokeS(@nid\szInfoTitle, title, 64)
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid) 
  
EndProcedure

PB 5.10 Windows 7 x64 SP1
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

thank you for the update ;)
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Kiffi
Addict
Addict
Posts: 1484
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Flype UserLibraries for PureBasic 4.0

Post by Kiffi »

Hello Flype,

unfortunately PureStorage is down. :( Is there a chance to download your libs anywhere else?

TIA & Greetings ... Kiffi
Hygge
User avatar
Tomi
Enthusiast
Enthusiast
Posts: 270
Joined: Wed Sep 03, 2008 9:29 am

Re: Flype UserLibraries for PureBasic 4.0

Post by Tomi »

Please Update DL_Links :oops:
all is broken
cas
Enthusiast
Enthusiast
Posts: 597
Joined: Mon Nov 03, 2008 9:56 pm

Re: Flype UserLibraries for PureBasic 4.0

Post by cas »

Site had a blow out... trying to get everything back online... sorry all.
I'm waiting for new links, too.
Thanks
quasiperfect
Enthusiast
Enthusiast
Posts: 157
Joined: Tue Feb 13, 2007 6:16 pm
Location: Romania
Contact:

Re: Flype UserLibraries for PureBasic 4.0

Post by quasiperfect »

any news on the links ?
Registered user of PureBasic
ruyi7952
User
User
Posts: 11
Joined: Thu Jan 21, 2010 5:27 pm

Re: Flype UserLibraries for PureBasic 4.0

Post by ruyi7952 »

:oops: can't download
SoS
User
User
Posts: 13
Joined: Sat Feb 18, 2006 4:46 am

Re: Flype UserLibraries for PureBasic 4.0

Post by SoS »

The libs are online on http://code.google.com/p/rwrappers/ , http://rwrappers.googlecode.com/svn/trunk

Use an SVN-client , eg. (http://tortoisesvn.net/), to download.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Flype UserLibraries for PureBasic 4.0

Post by DoubleDutch »

GitHub is nicer (for the downloader) - any chance of using that too?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: Flype UserLibraries for PureBasic 4.0

Post by Thunder93 »

Regards to SysTrayIconEx...
To have it support x64 and some other adjustments. Is working with PB 5.22 LTS Beta

SysTrayIconRes.pbi

Code: Select all

;-----------------------------------------------------------
;- Object:   NotifyIcon UserLibrary
;- Version:  1.1, May 2006
;-           
;- Requir.:  PureBasic 4.0
;-           TailBite 1.3 PR 1.0
;-           
;- Author:   flype - flype@altern.org
;-           
;- Descr.    Microsoft SHELL_NOTIFYICON
;-           Functions for Systray Icon (shellapi.h)
;-----------------------------------------------------------


;-----------------------------------------------------------
; Constants
;-----------------------------------------------------------

Enumeration ; #WM
  #WM_USER       = $400
  #WM_NOTIFYICON = $400 + $7258
EndEnumeration
Enumeration ; #NIF
  #NIF_MESSAGE = $01 ; 95+
  #NIF_ICON    = $02 ; 95+
  #NIF_TIP     = $04 ; 95+
  #NIF_STATE   = $08 ; 95+
  #NIF_INFO    = $10 ; 2000+
  #NIF_GUID    = $20 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIIF
  #NIIF_NONE      = $00 ; 2000+
  #NIIF_INFO      = $01 ; 2000+
  #NIIF_WARNING   = $02 ; 2000+
  #NIIF_ERROR     = $03 ; 2000+
  #NIIF_USER      = $04 ; XPSP2+
  #NIIF_ICON_MASK = $0F ; XP+ Reserved
  #NIIF_NOSOUND   = $10 ; XP+ Reserved
EndEnumeration
Enumeration ; #NIM
  #NIM_ADD        = 0 ; 95+
  #NIM_MODIFY     = 1 ; 95+
  #NIM_DELETE     = 2 ; 95+
  #NIM_SETFOCUS   = 3 ; 2000+
  #NIM_SETVERSION = 4 ; 2000+
EndEnumeration
Enumeration ; #NIN
  #NINF_KEY             = 1
  #NIN_SELECT           = $400
  #NIN_KEYSELECT        = $401
  #NIN_BALLOONSHOW      = $402 ; XP+
  #NIN_BALLOONHIDE      = $403 ; XP+
  #NIN_BALLOONTIMEOUT   = $404 ; XP+
  #NIN_BALLOONUSERCLICK = $405 ; XP+
EndEnumeration
Enumeration ; #NIS
  #NIS_HIDDEN     = 1 ; 2000+
  #NIS_SHAREDICON = 2 ; 2000+
EndEnumeration

  #NOTIFYICON_VERSION     = 3   ; 2000+


Structure NOTIFYICONDATA_95 Align #PB_Structure_AlignC
  cbSize.l
  hwnd.i
  uID.l 
  uFlags.l 
  uCallbackMessage.l 
  hIcon.i
  szTip.c[128] 
EndStructure 
Structure NOTIFYICONDATA_2K Extends NOTIFYICONDATA_95
  szTipEx.c[128] 
  dwState.l
  dwStateMask.l 
  szInfo.c[256] 
  StructureUnion 
  uTimeout.l 
  uVersion.l 
  EndStructureUnion 
  szInfoTitle.c[128]
  dwInfoFlags.l
EndStructure 
Structure NOTIFYICONDATA_XP Extends NOTIFYICONDATA_2K
  guid.GUID
EndStructure 
SysTrayIconEx.pb

Code: Select all

;------------------------------------------------------------------------------------------------
;- Object:   SysTrayIconEx UserLibrary
;- Version:  1.0, May 2006
;- Author:   flype - flype@altern.org
;- Requir.:  PureBasic 4.0 / TailBite 1.3 PR 1.2
;------------------------------------------------------------------------------------------------


;EnableExplicit


IncludeFile "SysTrayIconRes.pbi"


;------------------------------------------------------------------------------------------------
; AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l [, tip.s])
; RemoveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
; HideSysTrayIconEx(uID.l, hWindow.l, state.l)
; SetActiveSysTrayIconEx(uID.l, hWindow.l)
; SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l [, flags.l]) 
;------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 95+
;------------------------------------------------------------------------------------------------

ProcedureDLL.l AddSysTrayIconEx(uID.l, hWindow.l, hIcon.l)
  
  Protected nid.NOTIFYICONDATA_95
  
  nid\cbSize           = SizeOf(NOTIFYICONDATA_95)
  nid\uID              = uID
  nid\hwnd             = hWindow
  nid\hIcon            = hIcon
  nid\uFlags           = #NIF_MESSAGE | #NIF_ICON
  nid\uCallbackMessage = #WM_NOTIFYICON
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
  
EndProcedure
ProcedureDLL.l AddSysTrayIconEx2(uID.l, hWindow.l, hIcon.l, tip.s)
  
  Protected nid.NOTIFYICONDATA_2K
  
  nid\uID              = uID
  nid\hwnd             = hWindow
  nid\hIcon            = hIcon
  nid\uFlags           = #NIF_MESSAGE | #NIF_ICON | #NIF_TIP
  nid\uCallbackMessage = #WM_NOTIFYICON
  
  If OSVersion() >= #PB_OS_Windows_2000
    PokeS(@nid\szTip, tip, 128)
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    PokeS(@nid\szTip, tip, 64)
    nid\cbSize = SizeOf(NOTIFYICONDATA_95)
  EndIf
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_ADD, @nid)
  
EndProcedure
ProcedureDLL.l RemoveSysTrayIconEx(uID.l, hWindow.l)
  
  Protected nid.NOTIFYICONDATA_95
  
  nid\cbSize = SizeOf(NOTIFYICONDATA_95)
  nid\uID    = uID
  nid\hwnd   = hWindow
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_DELETE, @nid)
  
EndProcedure
ProcedureDLL.l SysTrayIconToolTipEx(uID.l, hWindow.l, tip.s)
  
  Protected nid.NOTIFYICONDATA_2K
  
  nid\uID    = uID
  nid\hwnd   = hWindow
  nid\uFlags = #NIF_TIP
  
  If OSVersion() >= #PB_OS_Windows_2000
    PokeS(@nid\szTip, tip, 128)
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    PokeS(@nid\szTip, tip, 64)
    nid\cbSize = SizeOf(NOTIFYICONDATA_95)
  EndIf
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid)
  
EndProcedure


;------------------------------------------------------------------------------------------------
; Compatibility : Microsoft Windows 2000+
;------------------------------------------------------------------------------------------------

ProcedureDLL.l HideSysTrayIconEx(uID.l, hWindow.l, state.l)
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_2000
    
    nid\cbSize      = SizeOf(NOTIFYICONDATA_2K)
    nid\uID         = uID
    nid\hwnd        = hWindow
    nid\uFlags      = #NIF_STATE
    nid\dwStateMask = #NIS_HIDDEN
    
    If state
      nid\dwState = #NIS_HIDDEN
    EndIf
    
    ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid) 
    
  EndIf
  
EndProcedure
ProcedureDLL.l SetActiveSysTrayIconEx(uID.l, hWindow.l)
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_2000
    
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
    nid\uID    = uID
    nid\hwnd   = hWindow
    
    ProcedureReturn Shell_NotifyIcon_(#NIM_SETFOCUS, @nid) 
    
  EndIf
  
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx(uID.l, hWindow.l, title.s, message.s, timeOut.l) 
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_XP
    nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
  ElseIf OSVersion() >= #PB_OS_Windows_2000
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    ProcedureReturn #False
  EndIf
  
  nid\uVersion = #NOTIFYICON_VERSION 
  Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
  
  nid\uID         = uID
  nid\hwnd        = hWindow
  nid\dwInfoFlags = #NIIF_INFO
  nid\uFlags      = #NIF_INFO
  nid\uTimeout    = timeOut
  
  PokeS(@nid\szInfo, message, 256) 
  PokeS(@nid\szInfoTitle, title, 64)
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid) 
  
EndProcedure
ProcedureDLL.l SysTrayIconBalloonEx2(uID.l, hWindow.l, title.s, message.s, timeOut.l, flags.l) 
  
  Protected nid.NOTIFYICONDATA_2K
  
  If OSVersion() >= #PB_OS_Windows_XP
    nid\cbSize = SizeOf(NOTIFYICONDATA_XP)
  ElseIf OSVersion() >= #PB_OS_Windows_2000
    nid\cbSize = SizeOf(NOTIFYICONDATA_2K)
  Else
    ProcedureReturn #False
  EndIf
  
  nid\uVersion = #NOTIFYICON_VERSION 
  Shell_NotifyIcon_(#NIM_SETVERSION, @nid)
  
  nid\uID         = uID
  nid\hwnd        = hWindow
  nid\dwInfoFlags = flags
  nid\uFlags      = #NIF_INFO
  nid\uTimeout    = timeOut
  
  PokeS(@nid\szInfo, message, 256) 
  PokeS(@nid\szInfoTitle, title, 64)
  
  ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nid) 
  
EndProcedure
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Post Reply