Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - TabControl.SetImageList error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TabControl.SetImageList error

 Post Reply Post Reply
Author
Message
Majek View Drop Down
Groupie
Groupie


Joined: 20 November 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Majek Quote  Post ReplyReply Direct Link To This Post Topic: TabControl.SetImageList error
    Posted: 21 November 2006 at 5:00pm
I'm trying to display 16x16 images from an ImageList on a TabControl, I have 12 tabs and 12 images in the Imagelist.
(TC=TabControl, IL=ImageList)
 
            With TC
                .SetImageList(IL)
                .InsertItem(0, "Play", 0, 0)
                .InsertItem(1, "Stop", 0, 1)
                .InsertItem(2, "Pause", 0, 2)
                .InsertItem(3, "Resume", 0, 3)
                .InsertItem(4, "Back", 0, 4)
                .InsertItem(5, "Next", 0, 5)
                .InsertItem(6, "Random", 0, 6)
                .InsertItem(7, "Continuous", 0, 7)
                .InsertItem(8, "Reverse", 0, 8)
                .InsertItem(9, "Repeat", 0, 9)
                .InsertItem(10, "Shuffle", 0, 10)
                .InsertItem(11, "Queue", 0, 11)
                .InsertItem(12, "Info", 0, 12)
            End With
 
When I run it it returns this exception:

System.InvalidCastException: No such interface supported
   at System.Runtime.InteropServices.Marshal.GetIDispatchForObject(Object o)
   at System.Runtime.InteropServices.DispatchWrapper..ctor(Object obj)
   at System.RuntimeType.WrapArgsForInvokeCall(Object[] aArgs, Int32[] aWrapperTypes)
   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
   at XtremeSuiteControls._DTabControl.SetImageList(Object ImageList)
   at AxXtremeSuiteControls.AxTabControl.SetImageList(Object imageList)
   at WindowsApplication1.frmMain.frmMain_Load(Object sender, EventArgs e)
 
Am I doing something wrong?
Back to Top
Majek View Drop Down
Groupie
Groupie


Joined: 20 November 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Majek Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2006 at 1:36am
make that 13 tabs
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 22 November 2006 at 1:53am
Hi,
 
When you call SetImageList you must use ActiveX vesion of mscommCtrl imagelist (I think you try managed vesion now).  Better use our ImageMnager control or load icons using TabControl.Icons property.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Majek View Drop Down
Groupie
Groupie


Joined: 20 November 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Majek Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2006 at 10:55am
Ohh okay thanks I see now. I wanted to use the ImageManager in the first place I just didnt know how.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.