Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9217139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:34:32+00:00 2026-06-18T02:34:32+00:00

I’m trying to write a program which has an expandable image feed that keeps

  • 0

I’m trying to write a program which has an expandable image feed that keeps adding pictures as I go. Before I bite off that chunk I’m just trying to get test going with a custom image class which will hold a little bit of extra info on top of the picturebox object. The issue I’m having is that my object (oSlideItem as clsSlideItem) which inherits the picturebox doesn’t seem to load a picture at run time. I’ve tried two different methods which are mentioned in help and on this forum and I can’t seem to get a picture at run time. I haven’t found anything that mentions my specific situation which is inheriting the picturebox.

I tried setting the image location and size properties before loading the picture, didn’t change anything.

Are there some extra steps I need to do in order to initiate the picturebox image since I am using the functionality in an inherited state instead of a native picturebox object ?

I am also putting these image holding objects into a collection as you can see. I tested loading a picture without putting it into a collection and nothing changed so I don’t think that is the issue. I am Assuming that once I add an object to a collection that the object inside the collection and the object outside the collection are decoupled. I didn’t do a good test for that yet.

Public Class clsSliders
Private clFeedItems As New Collection 'collection of all feed items
Private oFeed As New clsFeed 'feed organizer layer

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    'build Feed
    Dim oSlideItem As clsSlideItem 'feed item layer

    'make collection of slider objects
    oSlideItem = New clsSlideItem
    oSlideItem.setRank(1, oFeed)
    oSlideItem.ImageLocation = "C:\Users\nathan\Pictures\Chicago_River_from_Lake_Street_bridge.jpg"
    oSlideItem.Load()

    clFeedItems.Add(oSlideItem, 1)

    oSlideItem = New clsSlideItem
    oSlideItem.Image = Image.FromFile("C:\Users\nathan\Pictures\ReindeerPowerLines.png")
    oSlideItem.setRank(2, oFeed)

    'add to collection
    clFeedItems.Add(oSlideItem, 2)

    oSlideItem = New clsSlideItem
    oSlideItem.Image = Image.FromFile("C:\Users\nathan\Pictures\TianmenMountain.jpg")
    oSlideItem.setRank(3, oFeed)

    'add to collection
    clFeedItems.Add(oSlideItem, 3)

End Sub

'other subs and properties
End Class

and my second class:

Public Class clsSlideItem
Inherits PictureBox

Private iFeedRank As Integer 'current rank position

Public Sub setRank(rank As Integer, oFeed As clsFeed)
    If Not IsNothing(oFeed) Then
        Me.Left = oFeed.Left(rank)
        Me.Top = oFeed.Top(rank)
        Me.Width = oFeed.Width(rank)
        Me.Height = oFeed.Height(rank)
        iFeedRank = rank
    End If
End Sub

'other subs and properties
End Class

oFeed as clsFeed is basically a structure which I wrote as a class so that I can have extra functionality. It’s not really in the scope of this issue since that part of the code is working. I didn’t include it because I didn’t want to clutter up this post.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:34:33+00:00Added an answer on June 18, 2026 at 2:34 am

    It looks like the pictureboxes are never being added to the form controls collection. Add this

    Me.Controls.Add(oSlideItem)
    

    after

    oSlideItem = New clsSlideItem
    

    A control won’t be visible on (or contained by) the form until it is added to the Controls collection. I think the images are being read just fine, only they’re not displayed on the form. You can see by setting a breakpoint after the load and looking at the properties of oSlideItem (Shift-F9).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm trying to select an H1 element which is the second-child in its group
I have an array which has BIG numbers and small numbers in it. I
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to create an if statement in PHP that prevents a single post
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.