Tab ImageIndex problem

I have created a ImageList1 and it has one (1) image in it. I then associate the image list with the TabControl1. For some reason, the image does not show on the tabpage1. What am I doing wrong Below is the code. Thanks in advance for your help.

William

Public Sub AddDWG()

Dim AcadDocs As AcadDocuments
Dim Document As AcadDocument

AcadApp = StartCAD()
AcadDocs = AcadApp.Documents

For Each Document In AcadDocs

Dim myTabPage As New Windows.Forms.TabPage()

myTabPage.ImageIndex = 0

myTabPage.Text = Document.Name

TabControl1.TabPages.Add(myTabPage)

Next

End Sub



Answer this question

Tab ImageIndex problem

  • AUEX

    Hmm, I tried your code and it works fine on my end. Gotta be something simple. Any images in ImageList1



  • Fremen

    Don't forget TabControl1.ImageList = ImageList1


  • Cano

    I built a user control (*.dll) using .NET (express) that will run under AutoCAD, this control is not showing the images on the tabpage as intended.

    My file uses the control created by Jorge Lopez ( http://www.jrl-e.com )to access AutoCAD and show my control. I am just assuming that it has to do something with that, I have posted a question on his website.

    William

  • yuvals

    "Runs under AutoCAD". You need to explain that. Does it support .NET extensions nowadays



  • Woody1287

    Cool tool. But no doubt the source of your problem. Good luck!



  • Drewid

    Yes, there are images, it’s funny, I run it in VB and I see the icons, but when the actual program runs under AutoCAD, the Icons are not shown.

    William

  • vbvj

    I did that @ design time & just for kicks, I added just now to the code and ran it, but still, No image.

    William

  • Tab ImageIndex problem