English
Forum

TrayIcon and Messages

 

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
 
01/17/11  
 




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?
 
01/19/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

11.128 Views

Untitledvor 0 min.
H.Brill08/03/24
p.specht02/08/17
Georg Teles01/30/16
Ernst04/30/14
More...

Themeninformationen

this Topic has 1 subscriber:

Rolf Koch (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie