English
Source / code snippets

progress wallpaper.pcu of Prozentanzeige Setprogressvalue Taskbar

 
progress wallpaper.pcu of Prozentanzeige Setprogressvalue Taskbar
CompileMarkSeparation
'(C) Andreas Miethe

If $Winver <> "6.1"

    Messagebox("Erst ab Windows7","Sorry...",0)
    End

Endif

Var Ole& = Importdll("ole32.dll","")
'##############################
'Interface ITaskbarList3
DEF &QueryInterface 0
DEF &AddRef 4
DEF &Release 8
DEF &HrInit 12
DEF &AddTab 16
DEF &DeleteTab 20
DEF &ActivateTab 24
DEF &SetActiveAlt 28
DEF &MarkFullscreenWindow 32
DEF &SetProgressValue 36'(Fensterhandle,ULONGLONG(Completed),ULONGLONG(Total))
DEF &SetProgressState 40'(Fensterhandle,Flags)
DEF &RegisterTab 44
DEF &UnregisterTab 48
DEF &SetTabOrder 52
DEF &SetTabActive 56
DEF &ThumbBarAddButtons 60
DEF &ThumbBarUpdateButtons 64
DEF &ThumbBarSetImageList 68
DEF &SetOverlayIcon 72
DEF &SetThumbnailTooltip 76
DEF &SetThumbnailClip 80
'##############################
DEF &TBPF_NoProgress $00
DEF &TBPF_Indeterminate $01
DEF &TBPF_Normal $02
DEF &TBPF_Error $04
DEF &TBPF_Paused $08
DEF &CLSCTX_INPROC_SERVER 1
DEF &CLSCTX_LOCAL_SERVER  4
DEF &CLSCTX_SERVER 5
Declare CLSID_TASKBARLIST#,IID_ITASKBARLIST#
DIM CLSID_TASKBARLIST#,16
'{56FDF344-FD6D-11D0-958A-006097C9A090}
Long CLSID_TASKBARLIST#,0  = $56FDF344
Word CLSID_TASKBARLIST#,4  = $FD6D, $11D0, $8A95
Byte CLSID_TASKBARLIST#,10 = $00, $60, $97, $C9, $A0, $90
DIM IID_ITASKBARLIST#,16
'{56FDF342-FD6D-11D0-958A-006097C9A090}
Long IID_ITASKBARLIST#,0  = $56FDF342
Word IID_ITASKBARLIST#,4  = $FD6D, $11D0, $8A95
Byte IID_ITASKBARLIST#,10 = $00, $60, $97, $C9, $A0, $90
Windowtitle "Fortschritt"
CLS
Var Ende& = 0
Var RunButton& = Create("Button",%hwnd,"Run",10,10,80,24)
Var EndButton& = Create("Button",%hwnd,"Ende",10,40,80,24)
Var TaskbarVTable& = 0
CoInitialize(0)
Var Retval& = CoCreateInstance(CLSID_TaskbarList#, 0, &CLSCTX_SERVER, IID_ITaskbarList#,Addr(TaskbarVTable&))

If Retval& = 0

    CallInterface(TaskbarVTable&,&HrInit)
    CallInterface(TaskbarVTable&,&SetProgressState,%hwnd,&TBPF_Normal)

Endif

Whilenot Ende&

    Waitinput

    If Clicked(RunButton&)

        Progress()

    ElseIf Clicked(EndButton&)

        CallInterface(TaskbarVTable&,&Release)
        CoUninitialize()
        FreeDll Ole&
        Ende& = 1

    Endif

Endwhile

Proc Progress

    Var Count& = 0
    Var Complete& = 1000
    Var Title$ = ""

    Repeat

        Inc Count&
        Title$ = Str$(Int(Count&/10))+" %"
        CallInterface(TaskbarVTable&,&SetProgressValue,%hwnd,Count&,0,Complete&,0)
        External("User32.dll","SetWindowTextA",%hwnd,Addr(Title$))
        Sleep 1

    Until Count& = 1000

    CallInterface(TaskbarVTable&,&SetProgressValue,%hwnd,0,0,1000,0)
    Windowtitle "Fortschritt"

Endproc

Proc CallInterFace

    Parameters VTable&,Funktion&
    Case %pCount = 2 : Return Call(Long(Long(VTable&,0),Funktion&),VTable&)
    Case %pCount = 3 : Return Call(Long(Long(VTable&,0),Funktion&),VTable&,&(3))
    Case %pCount = 4 : Return Call(Long(Long(VTable&,0),Funktion&),VTable&,&(3),&(4))
    Case %pCount = 5 : Return Call(Long(Long(VTable&,0),Funktion&),VTable&,&(3),&(4),&(5))
    Case %pCount = 6 : Return Call(Long(Long(VTable&,0),Funktion&),VTable&,&(3),&(4),&(5),&(6))
    Case %pCount = 7 : Return Call(Long(Long(VTable&,0),Funktion&),VTable&,&(3),&(4),&(5),&(6),&(7))
    Case %pCount = 8 : Return Call(Long(Long(VTable&,0),Funktion&),VTable&,&(3),&(4),&(5),&(6),&(7),&(8))

EndProc
n class=s1>'turn off by CallInterface(TaskbarVTable&,&SetProgressState,%hwnd,&TBPF_NoProgress)


3 kB
Hochgeladen:04/10/12
Downloadcounter176
Download
 
04/10/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.978 Views

Untitledvor 0 min.
Member 862464105/12/24
Thomas Freier01/30/24
funkheld05/14/23
Rschnett08/06/22
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


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