• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Graphics from an image list are missing at runtime.

I have several forms which have buttons with associated graphics. The graphics are contained in an image list. On one of my forms, the buttons in one of the toolbars are missing their graphics at runtime. At designtime, they are fine. Other buttons in different toolbars on the same form work fine. All of the toolbars reference the same image file.

What's going on?
0
mrbilltx2
Asked:
mrbilltx2
1 Solution
 
Bob LearnedCommented:
So, you are saying the ImageList.Images.Count = 0 when running?  Is there anything like ImageList.Images.Clear?

Bob
0
 
amyhxuCommented:
Please provide some code so that we can take a better look.
0
 
mrbilltx2Author Commented:
I do everything at designtime. The is no runtime code associated with the images. It's just that for the toolbar in question, the images do not appear on the buttons while the buttons in the other toolbars on the page are fine.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ilairdCommented:
is it only in this one project or does it always happen... also even proprty canges at desine time show in the windows genarated section of code. post that. if it is only happening to you in this project, try deleting the toobar, and img list and receating it. if its everyproject you do then you might be best off reinstalling vs.
0
 
mrbilltx2Author Commented:
It only happens on one of over 50 forms in this project. I have deleted and re-installed the toolbar and deleted and re-copied the image list.
0
 
ilairdCommented:
lets see the wendows genarated code then
0
 
mrbilltx2Author Commented:
The toolbar containing the problematic buttons is tbbViewAccounts. The pertinent code is listed below:

 
      'tbViewAccounts
        '
        Me.tbViewAccounts.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.tbViewAccounts.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.tbViewAccounts.Buttons.AddRange(New System.Windows.Forms.ToolBarButton() {Me.tbbViewAccountNotes, Me.tbbViewPaymentSchedule, Me.tbbPaymentHistory, Me.tbbViewCustomerInformation, Me.tbbViewVehicleInformation, Me.tbbSaleDocuments})
        Me.tbViewAccounts.ButtonSize = New System.Drawing.Size(32, 32)
        Me.tbViewAccounts.Dock = System.Windows.Forms.DockStyle.None
        Me.tbViewAccounts.DropDownArrows = True
        Me.tbViewAccounts.Font = New System.Drawing.Font("Arial", 7.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.tbViewAccounts.ImageList = Me.ImageList
        Me.tbViewAccounts.Location = New System.Drawing.Point(580, 248)
        Me.tbViewAccounts.Name = "tbViewAccounts"
        Me.tbViewAccounts.ShowToolTips = True
        Me.tbViewAccounts.Size = New System.Drawing.Size(84, 122)
        Me.tbViewAccounts.TabIndex = 6
        '
        'tbbViewAccountNotes
        '
        Me.tbbViewAccountNotes.ImageIndex = 14
        Me.tbbViewAccountNotes.ToolTipText = "Account Notes"
        '
        'tbbViewPaymentSchedule
        '
        Me.tbbViewPaymentSchedule.ImageIndex = 15
        Me.tbbViewPaymentSchedule.ToolTipText = "View Payment Schedule"
        '
        'tbbPaymentHistory
        '
        Me.tbbPaymentHistory.ImageIndex = 16
        Me.tbbPaymentHistory.ToolTipText = "Payment History"
        '
        'tbbViewCustomerInformation
        '
        Me.tbbViewCustomerInformation.ImageIndex = 13
        Me.tbbViewCustomerInformation.ToolTipText = "View Customer Information"
        '
        'tbbViewVehicleInformation
        '
        Me.tbbViewVehicleInformation.ImageIndex = 10
        Me.tbbViewVehicleInformation.ToolTipText = "View Vehicle Information"
        '
        'tbbSaleDocuments
        '
        Me.tbbSaleDocuments.ImageIndex = 17
        Me.tbbSaleDocuments.ToolTipText = "Reprint Sale Documents"
        '
        'ImageList
        '
        Me.ImageList.ImageSize = New System.Drawing.Size(32, 32)
        Me.ImageList.ImageStream = CType(resources.GetObject("ImageList.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.ImageList.TransparentColor = System.Drawing.Color.Transparent
0
 
ilairdCommented:
You said that - tbbViewAccounts - is the controle name... Is it tbbViewAccounts or tbViewAccounts becuase i dont see a tbbViewAccounts initiated in the code
0
 
mrbilltx2Author Commented:
The toolbar is tbViewAccounts - my mistake. I use tb for the toolbar and tbb for the prefix of each button name.
0
 
mrbilltx2Author Commented:
I fixed it by deleting the toolbar, then copying and modifying another toolbar. I have no idea what the original problem might have been.
0
 
RomModCommented:
The question has been PAQ'd and the 500 points have been refunded.
RomMod
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now