| |
|
|
Rolf Koch | Huhu from here already gepostetem reason use I a old routine and not The finished things the Tray icons in a proposition. It's all right therefore, that it To then went, by Message To to check on, whether The mouse over the Trayicon dwell. How written: went it former always, since the UserMessage (see code) 1234 always then entering, if one with the Cursor over the Icon dwelt and these again on 0 was, once one it left. see your a Error in reference the trouble? here one quick extrahierter code around the trouble darzustellen.
Def LoadIcon(2) !"USER32","LoadIconA"
DEF ExtractIcon(3) !"SHELL32","ExtractIconA"
Def GetClassLong(2) !"USER32","GetClassLongA"
Def GetCursorPos(1) !"USER32","GetCursorPos"
Def ShellNotify(2) !"SHELL32","Shell_NotifyIconA"
Def SetForegroundWindow(1) !"USER32","SetForegroundWindow"
Def GetDoubleClickTime(0) !"USER32","GetDoubleClickTime"
Def Sleep2(1) !"KERNEL32","Sleep"
Declare NIDATA#,Pos#,ic2#,end%,icondll&,Test4&
dim nidata#,100
Dim ic2#,100
Proc SetNewTip
Parameters t$
String NIDATA#,24=t $+Chr$(0)
ShellNotify(1,NIDATA#)'NIM_Modify
ENDPROC
Proc SetNewIcon
Parameters name$
declare icon_handle&
String ic2#,0=name$
icon_handle& = loadicon(icondll&,ic2#)' lever the Icons
Long NIDATA#,20 = icon_handle&
ShellNotify(1,NIDATA#)'NIM_Modify
ENDPROC
Proc SetIcon
Parameters name$
declare icon_handle&
String ic2#,0=name$
icon_handle& = ExtractIcon(%hinstance,ic2#,0)
'icon_handle&=loadicon(0,ic2#)' lever the Icons
Long NIDATA#,20 = icon_handle&
ShellNotify(1,NIDATA#)'NIM_Modify
ENDPROC
Proc CreateTrayIcon
Long NIDATA#, 0 = 88' Size the structure
Long NIDATA#, 4 = %hwnd' lever the Profanfensters
Long NIDATA#, 8 = 7777' unwichtig,yields &wparam with request,can also 0 his
Long NIDATA#, 12= 7' NIF_MESSAGE or NIF_ICON or NIF_TIP;
Long NIDATA#, 16 = 1234' benutzerdef. Message, must larger as 1024 (wm_user) his
Long NIDATA#, 20 = loadicon(icondll&,ic2#)'LoadIcon(0,0) ' lever one Systemicons
String NIDATA#, 24 = ""+Chr$(0)' Tooltip, max. 63 characters
ShellNotify(0,NIDATA#)' NIM_ADD
ENDPROC
proc add_tryicon
parameters Text$,icon$
Window Style $78
CreateTrayIcon
SetNewIcon icon$
endproc
proc del_tryicon
ShellNotify(2,NIDATA#)' NIM_DELETE
endproc
usermessages 1234
Window 0,0 - 800,800
Windowtitle "Rechtsklick on Icon to that terminate!"
add_tryicon "Test","A"
SETICON $winpath+"\\explorer.exe"
settimer 150
WhileNot end%
waitinput
if %wmtimer
print %umessage
'These Umessage ought to only 1234 with Mouseover Icon his. otherwise 0!
case &ulparam=516:End
endif
Endwhile
del_tryicon
|
|
|
| |
|
|
|
Rolf Koch | to that Info: with of/ one Problemsuche with iF is noticed, that one Timer as here in the drop The Umessages apparently wegkickt. Mussten us means what integrally other conceive. Why The Messages with %WMTIMER as here in the example not arrive, might Perhaps Roland clarify can, or? |
|
|
| |
|
|