[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Graphics from an image list are missing at runtime.

Posted on 2005-04-08
12
Medium Priority
?
257 Views
Last Modified: 2010-04-24
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
Comment
Question by:mrbilltx2
11 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 13738594
So, you are saying the ImageList.Images.Count = 0 when running?  Is there anything like ImageList.Images.Clear?

Bob
0
 
LVL 14

Expert Comment

by:amyhxu
ID: 13742004
Please provide some code so that we can take a better look.
0
 

Author Comment

by:mrbilltx2
ID: 13742049
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:ilaird
ID: 13749207
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
 

Author Comment

by:mrbilltx2
ID: 13753714
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
 
LVL 2

Expert Comment

by:ilaird
ID: 13758548
lets see the wendows genarated code then
0
 

Author Comment

by:mrbilltx2
ID: 13762219
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
 
LVL 2

Expert Comment

by:ilaird
ID: 13768837
You said that - tbbViewAccounts - is the controle name... Is it tbbViewAccounts or tbViewAccounts becuase i dont see a tbbViewAccounts initiated in the code
0
 

Author Comment

by:mrbilltx2
ID: 13772128
The toolbar is tbViewAccounts - my mistake. I use tb for the toolbar and tbb for the prefix of each button name.
0
 

Author Comment

by:mrbilltx2
ID: 13827335
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
 

Accepted Solution

by:
RomMod earned 0 total points
ID: 13902643
The question has been PAQ'd and the 500 points have been refunded.
RomMod
Community Support Moderator
0

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month18 days, 6 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question