| |
|
|
CB | Hello
I wanted to in my Program gladly The ongoing Time in the Statusbar and I me To this object time into diversen Forums umgesehen, unfortunately but none Posting found, where the directly umgesetzt was. some Fundstücke were but well for my tack useable - my Thanks for done Vorarbeiten on Andreas Miethe, Rolf Koch and Co. Herausgekommen isn't only The Uhrzeit, separate too another small optische Spielerei with 2 LEDs in the Statuszeile. The Icons are - with few unverkennbaren Ausnahmen - selbstfabriziert, your must means quiet grab.
plenty Fun, Christian |
|
|
| |
|
|
|
Rolf Koch | Hi Christian,
comes Real well the part. has Real what Modernes.
Rolf |
|
|
| |
|
|
|
CB | Hi Rolf,
many Thanks for flowers! a morsel of optischer Aufputz can one Program not damage. I must but confess - The meiste work on it were The Icons (there are many hours draufgegangen on my own for Schattenwurf), whom code have I Yes größtenteils of you übernommen and something modifiziert zusammengestoppelt.
Christian |
|
|
| |
|
|
|
| Perhaps one bisl praktischer in the application (there no Timer The Hauptroutine occupied) a small Änderung of me Your Sources - under Use the Thread.pcu (to that Download spare).
$H windows.ph
$H messages.ph
$H commctrl.ph
$u thread.pcu = thread.
Def ExtractIconExA(5) !"SHELL32","ExtractIconExA"
Def Time(0) @Left$(@time$(0)+":"+@time$(1),8)
declare hwidthx&,hwidthy&
proc thread.do
parameters n&
if (n&=1)
IcoNr2$ = @Str $(IcoNr2&)
iconhandle1& = GetIconA_Handle("Eigene.dll",IcoNr1&,0) "On-Off" Icon
iconhandle2& = GetIconA_Handle("Eigene.dll",IcoNr2&,0) "Wechsel"-Icon
~SendMessage(Status&,$40F,1,iconhandle1&)
~SendMessage(Status&,$40F,2,iconhandle2&)
~SendMessage(Status&,$401,3,"Icon Nr. " + IcoNr2$ + From the Own.dll")Text the Part 4 allocate
~SendMessage(Status&,$401,4 | ~SBT_NOBORDERS,"" + Time()) Text the Part 5 allocate
INC IcoNr2&
If IcoNr1& = 1
IcoNr1& = 2
Else
IcoNr1& = 1
EndIf
elseif (n&=2)
if ( (hwidthx&<>width(%hwnd)) or (hwidthy&<>height(%hwnd)) )
hwidthx&=width(%hwnd)
hwidthy&=height(%hwnd)
setwindowpos status& = 0,0 - 0,0 ;0
endif
endif
endproc
Proc GetIconA_Handle only the lever detect
Parameters IconFile$,IconNr$, tall% small Icons = 0 large = 1
Declare DllIcon&, ST#, PT#
Dim ST#,add(len(IconFile$),1)
Dim Pt#,4
String ST#,0 = IconFile$
Let DllIcon& = ExtractIconA(%Hinstance,ST#,val(IconNr$)) large Icons
if tall% = 0
ExtractIconExA(ST#,val(IconNr$),0,Pt#,1) small Icons
else
ExtractIconExA(ST#,val(IconNr$),Pt#,0,1) large Icons
endif
DllIcon& = Long(Pt#,0)
Dispose ST#
Dispose Pt#
return DllIcon&
Endproc
Declare Status&,IntWidth#,iconhandle1&,iconhandle2&,IcoNr1&,IcoNr2&,IcoNr2$
windowstyle ( 512 | 1 | 2 | 4 | 8 )
CLS
Status& = Create("Statuswindow",%hwnd,"")
hwidthx&=width(%hwnd)
hwidthy&=height(%hwnd)
Dim Intwidth#,20
iconhandle1& = GetIconA_Handle("Eigene.dll",20,0) Ausgangs-Icon
iconhandle2& = GetIconA_Handle("Eigene.dll",20,0) Ausgangs-Icon
Long Intwidth#,0 = 356,378,400,565,%MaxX Integer-aray with Maßen the individual Textbereiche
~SendMessage(Status&,~SB_SETPARTS,5,IntWidth#) Parts settle
~SendMessage(Status&,$401,0 | ~SBT_POPOUT,"Text1") Texts the Part allocate
~SendMessage(Status&,$40F,1,iconhandle1&)
~SendMessage(Status&,$40F,2,"")
~SendMessage(Status&,$401,3,"") Wechselicon + Text the Part allocate
~SendMessage(Status&,$401,4 | ~SBT_NOBORDERS,"") Leerstring the Part allocate
IcoNr1& = 1
IcoNr2& = 0
if (val(translate $(thread.ver(),".","")) < 14)
messagebox "Zu old Thread.pcu","",0
end
endif
thread.start 1,7 thread channel 1 started with intervallspeed 6 (halbsekündlich)
thread.start 2,4 thread channel 2 started with intervallspeed 4 (achtelsekündlich)
Whilenot (%key=2)
Waitinput
Endwhile
thread.stop 1
thread.stop 2
Dispose Intwidth#
End
salvo, iF |
|
|
| |
|
|
|
CB | Hello, David Vielen Thanks for your hint! mere does it Downloads-directory (yet) not - I take heavy on, you know the anyhow, even if there standing Please verständigen tappt im dunkeln .... Gibts another others fountain for Thread.pcu?
with the opportunity another Note to Statusbar: XProfan 9 power in the dzt. Beta a Darstellungsfehler - The last both Parts go not displayed (I thought, I had a Errors in the code, To I on The idea coming, time again on Version 8 zurückzustellen)
Sincerely, Christian |
|
|
| |
|
|
|
CB | @iF: already found - Have times the Suchmaschine angeworfen... |
|
|
| |
|
|
|
CB | Hi,
a question about Statusbar is now emerged: I wanted to gladly a real Blink-LED in the Statusbar to assimilate (display of Speichervorgängen etc.) The BlinkLED is a .ani, The well in a Control in the Window runs, in the Statuszeile becomes tappt im dunkeln of course displayed, however without Animation. can I a Ani really not in the Statuszeile Show?
Sincerely, Christian |
|
|
| |
|
|
|
Rolf Koch | Hi Christian,
Erstell still simply in the Statusbar one Static and this The Ani.
short quick zusammengestellt:
CREATESTATUSBAR "STATUSBAR" Parameter 1=Text in Statusbar
LET STATUSBAR&=@&(0)
declare ANICONTROL&
ANICONTROL&=Control("STATIC","",$54000100,10,0,32,32,STATUSBAR&,0,%hinstance,$0)
ANIMICON 0 ,"C:FLY.ANI",ANICONTROL&,0,0,0032,0032
by me functions but the Anim in a Statusbar.
Wird auch animiert dargestellt. have You Perhaps too whom Error How I at the beginning made and
ANIMICON 0 ,C:FLY.ANI,STATUSBAR&,[shadow=red:7ea046e47d]120,30[/shadow:7ea046e47d],0032,0032
there not y%=0 association? Habs hold with ROC prepares and there works it (if I hold as an afterthought the Fensterhandle the Statusbar angebe) Rolf |
|
|
| |
|
|
|
Rolf Koch | Nochmal I (hmm I Have Yes still christmas, kanns but not adjust )
Have time quick an example made. here but only in a einfachen Statusbar.
Rolf |
| 3 kB | | Kurzbeschreibung: | Led in the Statusbar, which too yet furthermore animiert is. | | Hochgeladen: | 01/18/05 | | Downloadcounter: | | | | Download |
|
|
| |
|
|
|
CB | Hi Rolf, your LED comes my imaginations already very near, I come only with a point not yet zurecht: How wars I one Control in a Part of my shared Statusbar? i'd namely gladly in Part 1 actually Statusmessages, in Part 2 zB. The Blinkled, in Part 3 one straight News Icon and in the last Part The Uhrzeit overlay.
Sincerely, Christian |
|
|
| |
|
|
|
CB | Hi again, I habs straight geschafft - must but yet some manage, on the evening then whom whole code entmüllen, my ANI verkleinern (is To big for Statusbar), on the evening would have the code then in the Forum his. To then, Christian |
|
|
| |
|
|
|
Rolf Koch | .. nadann is Yes everything clear
Rolf |
|
|
| |
|
|