Print Page | Close Window

Icon.dll see in Taskpanel

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=5847
Printed Date: 08 May 2024 at 3:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Icon.dll see in Taskpanel
Posted By: Ingrid
Subject: Icon.dll see in Taskpanel
Date Posted: 20 December 2006 at 5:33am
Hello,
i can not load my icon.dll.
As can I mean own Icon.DLL shop and the task panel to assign as well as individual ranges Icons assign.

I have not found example.



Ingrid



Replies:
Posted By: Oleg
Date Posted: 20 December 2006 at 7:28am
Hi,
Use ExtractIconEx API to load it and Icons.AddIcon to add.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ingrid
Date Posted: 22 December 2006 at 10:07am
Hey,
this not function.
have you a example with the Taskpanel.

Thank


Posted By: Oleg
Date Posted: 22 December 2006 at 10:23am
Hello,
It is Win32 API function. google string "declare ExtractIconEx" and you will find a lot of examples.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Ingrid
Date Posted: 03 January 2007 at 6:00am
Hello I do not load the DLL in the background already over a function get the loaded OCX the task panel handed over. Here an example.

Start:
50170     If TaskP.oInit(Me.TaskPanel1) Then
50180        Load_menue2_CHINOUT mArray()
50190        If TaskP.ErzeugePanel(mArray(), 7) Then
50200             DoEvents
50210        End If
50220        'TaskPanel1.SetImageList imlTaskPanelIcons
50230     End If

Public Function ErzeugePanel(arr() As String, anzahlicon As Long) As Boolean
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
On Error GoTo ErrPtnr_OnError
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
50010     Dim Gruppen As Integer, Einträge As Long, anzahl As Integer, iconnr As Long
50020
50030     Dim FolderData As TaskPanelGroup, FolderPropertyPanes As TaskPanelGroup, _
        FolderComponents As TaskPanelGroup, FolderWindowsForms As TaskPanelGroup
50050
50060     iconnr = 1
50070     anzahl = Val(LTrim(arr(0, 0)))
50080     If anzahl > 0 Then
50090        With myTaskPanel
50100             For Gruppen = 1 To anzahl
50110                 If LTrim(arr(Gruppen, 0)) <> "" Then
50120                     Set FolderPropertyPanes = CreateToolboxGroup(myTaskPanel, arr(Gruppen, 0))
50130                     For Einträge = 1 To 10
50140                         If LTrim(arr(Gruppen, Einträge)) <> "" Then
50150                             If iconnr <= anzahlicon Then
50160                                 CreateToolboxItem FolderPropertyPanes, arr(Gruppen, Einträge), Frm_Kalender.oIcons.Image(6700) 'iconnr ' (Gruppen * 1000) + Einträge
50170                                 iconnr = iconnr + 1
50180                             Else
50190                                 iconnr = 1
50200                             End If
50210                         End If
50220                     Next Einträge
50230                 End If
50240             Next Gruppen
50250        End With
50260        ErzeugePanel = True
50270     Else
50280        Beep
50290        MsgBox "Fehler in Classe TaskPannel.ErzeugePanel(arr()=0"
50300        ErzeugePanel = False
50310     End If
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
Exit Function
ErrPtnr_OnError:
Select Case ErrPtnr.OnError("Cls_TaskPanel", "ErzeugePanel")
Case 0: Resume
Case 1: Resume Next
Case 2: Exit Function
Case 3: End
End Select
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
End Function


Private Function CreateToolboxGroup(tbox As TaskPanel, Caption As String) As TaskPanelGroup
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
On Error GoTo ErrPtnr_OnError
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
50010     Dim Folder As TaskPanelGroup, Pointer As TaskPanelGroupItem
50020
50030     Set Folder = tbox.Groups.Add(0, Caption)
          'Set Folder = tbox.AddIconHandle(Frm_Kalender.oIcons.Image(6700))
50040     Set CreateToolboxGroup = Folder
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
Exit Function
ErrPtnr_OnError:
Select Case ErrPtnr.OnError("Cls_TaskPanel", "CreateToolboxGroup")
Case 0: Resume
Case 1: Resume Next
Case 2: Exit Function
Case 3: End
End Select
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
End Function

Private Function CreateToolboxItem(Group As TaskPanelGroup, Caption As String, IconIndex As Long) As TaskPanelGroup
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
On Error GoTo ErrPtnr_OnError
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
50010     Group.Items.Add IconIndex + 1, Caption, xtpTaskItemTypeLink, IconIndex
'---ErrPtnr-OnError-START--- DO NOT MODIFY ! ---
Exit Function
ErrPtnr_OnError:
Select Case ErrPtnr.OnError("Cls_TaskPanel", "CreateToolboxItem")
Case 0: Resume
Case 1: Resume Next
Case 2: Exit Function
Case 3: End
End Select
'---ErrPtnr-OnError-END--- DO NOT MODIFY ! ---
End Function

Shop of the own Icons does not function. It does not indicate it to me. Greeting Ingrid



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net