English
Applications

TrayAPP Template

 
- Page 1 -


good skeleton for a TrayAPP? Funktionierts everywhere?

963 kB
Hochgeladen:12/25/07
Downloadcounter422
Download
2 kB
Hochgeladen:12/25/07
Downloadcounter427
Download
1 kB
Hochgeladen:12/25/07
Downloadcounter300
Download
 
12/25/07  
 



 
- Page 1 -



Michael
Wodrich
this is Yes gemogelt - single- and Double click together...
 
Programmieren, das spannendste Detektivspiel der Welt.
12/26/07  
 



Gib To, it reacted perfect. so often one with left clicking - so often becomes hwndAnzeige correctly getoggelt.

circa Einzelklick correctly abzufangen could one it How MS make - good example is the sndvol32.exe. quick sees to the there waited becomes. (for what it x Lösungsansätze gives)
 
12/26/07  
 




Michael
Wodrich
sound already in of my question on Roland on ...whether we the self make should.

Beautiful would one sauberes Double click-incident.

Best wishes
Michael Wodrich



Gib To, it reacted perfect.


mandatory I the extra allude?
 
Programmieren, das spannendste Detektivspiel der Welt.
12/26/07  
 



this is Yes the joke, such one sauberes Doppelklickereignis get You Yes! its hold you give over whether and How You on the einfachen Click respond. it would indeed pity if the simple Click first to term the Doppelklickzeit gemeldet would.
 
12/26/07  
 



well, then can the skeleton Perhaps yet with a couple Vervollständigungen close.

Verbesserungsvorschläge?

447 kB
Hochgeladen:12/26/07
Downloadcounter480
Download
 
12/26/07  
 



hm 2x loaded is ca. 50 time To little, click You means here  [...]  and say obs working...
 
12/27/07  
 




Christian
Eichler
iF
hm 2x loaded is ca. 50 time To little, click You means here  [...]  and say obs working...


shining correct To funktionnieren (Win XP SP2). Linksklick becomes one Window unzipped, Rechtsklick one Menu
 
Debian Lenny, Intel Celeron 2,8 Ghz, 768 MB Ram && Win XP Pro, Intel C2D 1,66Ghz, 2 GB Ram ... PROFAN² 6.6
12/27/07  
 




Jörg
Sellmeyer
Christian Eichler
iF
hm 2x loaded is ca. 50 time To little, click You means here  [...]  and say obs working...


shining correct To funktionnieren (Win XP SP2). Linksklick becomes one Window unzipped, Rechtsklick one Menu


Dito
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/27/07  
 



Have no Linux with ui here - what says wine?
 
12/27/07  
 



 
- Page 2 -



Jörg
Sellmeyer
iF
what says wine?


Cheers!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/27/07  
 




Michael
Wodrich
now Have I it kaputtgespielt. Schaust You time?

(Huch, Version 2 Have I not yet entpackt)
REM XProfan v11.0ß s8-NT
Def %MyMenu_InfoApp $1400
Def %MyMenu_ExitApp $1401
Def $DefTooltip (what seek because this Program here?)
Struct TrayData = hAppWin&, hIcon&, ShowMode%, ToolTip$(63)
Class Tray = -TrayData,
+Tray@, +Start@, +Stop@,
+SetIcon@, +SetText@, +SetIconAndText@,
+Menu@,
+ShowWindow@, +SwitchWindow@

Proc Tray.Tray

    Initialisiert whom Datenbereich
    .ShowMode% = 1 : .hAppWin& = 0 : .hIcon& = 0 : .ToolTip$ = $DefTooltip
    Return 1

ENDPROC

Proc Tray.Start

    Tray.Start(hAppWin&,{Icon$|Icon&|0},{Tooltip$|})
    Par 1 - hAppWin&
    Par 2 - IconName$ or IconHandle& or 0 (zero) (then before: .SetIcon)
    Par 3 - ToolTip$ or  (then before: .SetText)
    (the IconHandle& becomes intern über Tray.Stop away.)
    Declare type$, AppWin&, ErrMsg$, erg% : Clear erg%  0 = Error, 1 = OK
    ErrMsg$ = Tray.Start needed three (3) Parameter
    Tray.Start( hAppWin&, {Icon$|Icon&|0}, {Tooltip$|qq} )

    If %PCount <> 3

        MessageBox(ErrMsg$,Parameter-Error (amount),16 + 4096 + 262144)

    Else

        type$ = PType$(2)

        Select Left$(type$,1)

            CaseOf &  it watts one IconHandle indicated

            Parameters p1a&,p2a&,p3a$
            AppWin& = p1a& : erg% = .SetIconAndText(p2a&,p3a$)

            CaseOf $  it watts the name one internen Icons indicated

            Parameters p1b&,p2b$,p3b$
            AppWin& = p1b& : erg% = .SetIconAndText(p2b$,p3b$)
            Otherwise
            MessageBox(ErrMsg$,Parameter-Error (type),16 + 4096 + 262144)

        EndSelect

        .hAppWin& = AppWin&
        Casenote .hAppWin& : Clear erg%

        If erg%

            Casenote .hIcon& : .hIcon& = Create(hIcon,A)
            Case .Tooltip$ =  : .ToolTip$ = $DefTooltip
            TrayIcon(Add,.hAppWin&,1,.hIcon&,.ToolTip$)

        EndIf

    EndIf

    Return erg%

ENDPROC

Proc Tray.SetIcon

    Tray.SetIcon( {Icon$|Icon&} )
    Par 1 - IconName$ or IconHandle&
    Declare type$, ErrMsg$, erg% : Clear erg%  0 = Error, 1 = OK
    ErrMsg$ = Tray.SetIcon needed a (1) Parameter
    Tray.SetIcon( {Icon$ | Icon&} )

    If %PCount <> 1

        MessageBox(ErrMsg$,Parameter-Error (amount),16 + 4096 + 262144)

    Else

        type$ = PType$(1)

        Select Left$(type$,1)

            CaseOf &  it watts one IconHandle indicated

            Parameters p1a&

            If .hIcon& : Case .hIcon& <> p1a& : DeleteObject .hIcon& : EndIf

                .hIcon& = p1a&
                Case .hAppWin& : TrayIcon(SetIcon,.hAppWin&,1,.hIcon&)
                inc erg%

                CaseOf $  it watts the name one internen Icons indicated

                Parameters p1b$
                Case .hIcon& : DeleteObject .hIcon&
                .hIcon& = Create(hIcon,p1b$)
                Case .hAppWin& : TrayIcon(SetIcon,.hAppWin&,1,.hIcon&)
                inc erg%
                Otherwise
                MessageBox(ErrMsg$,Parameter-Error (type),16 + 4096 + 262144)

            EndSelect

        EndIf

        Return erg%

    ENDPROC

    Proc Tray.SetText

        Tray.SetText( Tooltip$ )
        Par 1 - ToolTip$
        Parameters Txt$
        Declare ErrMsg$, erg% : Clear erg%  0 = Error, 1 = OK
        ErrMsg$ = Tray.SetText needed a (1) Parameter
        Tray.SetText( Tooltip$ )

        If %PCount <> 1

            MessageBox(ErrMsg$,Parameter-Error (amount),16 + 4096 + 262144)

        Else

            .Tooltip$ = Txt$
            Case .hAppWin& : TrayIcon(SetText,.hAppWin&,1,.Tooltip$)
            inc erg%

        EndIf

        Return erg%

    ENDPROC

    Proc Tray.SetIconAndText

        Tray.SetIcon( {Icon$|Icon&}, Tooltip$ )
        Par 1 - IconName$ or IconHandle&
        Par 2 - ToolTip$
        Declare type$, ErrMsg$, erg% : Clear erg%  0 = Error, 1 = OK
        ErrMsg$ = Tray.SetIconAndText needed two (2) Parameter
        Tray.SetIconAndText( {Icon$|Icon&}, Tooltip$ )

        If %PCount <> 2

            MessageBox(ErrMsg$,Parameter-Error (amount),16 + 4096 + 262144)

        Else

            type$ = PType$(1)

            Select Left$(type$,1)

                CaseOf &  it watts one IconHandle indicated

                Parameters p1a&,p2a$
                erg% = .SetIcon(p1a&)
                Case erg% : erg% = .SetText(p2a$)

                CaseOf $  it watts the name one internen Icons indicated

                Parameters p1b$,p2b$
                erg% = .SetIcon(p1b$)
                Case erg% : erg% = .SetText(p2b$)
                Otherwise
                MessageBox(ErrMsg$,Parameter-Error (type),16 + 4096 + 262144)

            EndSelect

        EndIf

        Return erg%

    ENDPROC

    Proc Tray.Stop

        Declare erg%, h&
        Case .hAppWin& : TrayIcon(Delete,.hAppWin&,1)
        Case .hIcon& : DeleteObject .hIcon&
        .Tray()
        Return 1

    ENDPROC

    Proc Tray.ShowWindow

        Parameters fashion%
        Casenote .ShowMode% = fashion% : ShowWindow(.hAppWin&,fashion%)

        If fashion%

            External(user32,SetForegroundWindow,.hAppWin&)
            SetActiveWindow(.hAppWin&)

        EndIf

        .ShowMode% = fashion%
        Return 1

    ENDPROC

    Proc Tray.SwitchWindow

        .ShowWindow( 1 - .ShowMode% )
        Return 1

    ENDPROC

    Proc Tray.Menu

        Declare erg%
        CreateMenu
        AppendMenu %MyMenu_InfoApp,Info
        Separator
        AppendMenu %MyMenu_ExitApp,terminate
        SetActiveWindow(.hAppWin&)
        erg% = TrackMenu()
        SetMenuItem 0
        Return erg%

    ENDPROC

    rem -----------------------------------------------------------------------
    rem ------- MAIN ----------------------------------------------------------
    rem -----------------------------------------------------------------------
    Declare appTitle$
    appTitle$ = Par$(0)
    Window Style 2 | 4 | 8 | 16 | 512 | 1024
    Window Title appTitle$ +  - XProfan v + $ProfVer
    Cls
    Print The left Mouse button ändert whom Fensterstatus
    Print The rights Mouse button bring one Menu (Info=without Mainwindow)
    Print
    Print Why becomes in this Program the terminate not carryed out (Menu).
    Print
    Print If I the Window close, then works it.
    Print
    Print where is here the Error?
    Print
    Print
    Declare oTray#
    oTray# = New(Tray)
    Declare extIcon& : extIcon& = Create(hIcon,c:\windows\system32\moricons.dll,14)

    Ifnot oTray#.Start( %hWnd, extIcon&, appTitle$ )  appeal with lever one external Icons

        the Icon becomes through oTray#.Stop released

        Ifnot oTray#.Start( %hWnd, 0, appTitle$ )  without Iconauswahl

            Ifnot oTray#.Start( %hWnd, EDITOR, appTitle$ )  name one internen Icons

                MessageBox(Program gestoppt, because it not fehlerfrei operates.,Program-discontinue,16 + 4096 + 262144)
                oTray#.Stop()
                Dispose oTray#
                END

            EndIf

            User Messages 16  wm_close
            Declare end% : Clear end%

            WhileNot end%

                Select TrayIcon(Msg,1)

                     $201:L,$202:l,$203:LL, $204:R,$205:r,$206:RR, $207:M,$208:m,$209:MM

                    CaseOf $201  left

                    oTray#.SwitchWindow()

                    CaseOf $204  right

                    Select oTray#.Menu()

                        CaseOf %MyMenu_InfoApp

                        oTray#.ShowWindow( 0 )
                        MessageBox(TrayInfo-application,Info,0)

                        CaseOf %MyMenu_ExitApp

                        Inc end%
                        BREAK

                    EndSelect

                EndSelect

                Select %uMessage

                    CaseOf 16

                    Inc end%
                    BREAK

                EndSelect

                Case end% : BREAK
                Casenote end% : WaitInput
                Print Key:;%Key,
                , MenuItem:;%MenuItem,
                , MWnd:;%MWnd,
                , Message:;%Message
                Print wParam:;&wParam,($;Hex$(&wParam);),
                , lParam:;&lParam,($;Hex$(&lParam);)

            EndWhile

            oTray#.ShowWindow( 1 )
            oTray#.Stop()
            Dispose oTray#
            User Messages -16  Messages again Remove
            End

Best wishes
Michael Wodrich

P.s.: The code-Formatierer knows Select-EndSelect not.
 
Programmieren, das spannendste Detektivspiel der Welt.
12/27/07  
 




Zur Anwendung


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

18.947 Views

Untitledvor 0 min.
Gast.0815 vor 25 Tagen
Sven Bader11/08/22
RICOSCH02/11/16
Georg Teles02/09/16
More...

Themeninformationen



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