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

  • SEARCH
  • Home
  • 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 8199197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:07:19+00:00 2026-06-07T06:07:19+00:00

I made a splash screen program, that loads pictures from a folder and changes

  • 0

I made a splash screen program, that loads pictures from a folder and changes the images at interval, so the effect is – beating heart. But i want to load this images not from folder, but resources in the assembly. I dont know how to load this bitmap array, can u assist me? This is my code:

private static string imagefile;
    private static int selected = 0;
    private static int begin;
    private static int end = 0;
   // private static string path = SplashDemo.Properties.Resources.ResourceManager.GetStream();
    private static string path = "C:/Users/Desktop/Desktop/New folder";
    private static string[] folderFile = null;

    [STAThread ( )]
    private static void Main ( )
    {

        Splasher.Splash = new SplashScreen ( );
        Splasher.ShowSplash ( );
     // TIMER
        System.Timers.Timer timer = new System.Timers.Timer();
        timer.Interval = 50;
        timer.Enabled = true;
        timer.AutoReset = true;
        timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Tick);
    // END TIMER


    // GET ASSEMBLY FILS
        System.Reflection.Assembly thisExe;
        thisExe = System.Reflection.Assembly.GetExecutingAssembly();
        string[] resources = thisExe.GetManifestResourceNames();
      // Bitmap[] image = new Bitmap[string];
      // Bitmap[] imagew = new Bitmap[10];
      // Bitmap image = new Bitmap(file);
     //  string[] embeddedResources = Assembly.GetExecutingAssembly().GetManifestResourceNames();
      // END GET ASSEMBLY FILS


        // GET DIRECTORY FILES
        string[] part1 = null, part2 = null, part3 = null;
        part1 = Directory.GetFiles(path, "*.png");
        part2 = Directory.GetFiles(path, "*.jpeg");
        part3 = Directory.GetFiles(path, "*.bmp");
        folderFile = new string[part1.Length + part2.Length + part3.Length];
        Array.Copy(part1, 0, folderFile, 0, part1.Length);
        Array.Copy(part2, 0, folderFile, part1.Length, part2.Length);
        Array.Copy(part3, 0, folderFile, part1.Length + part2.Length, part3.Length);
        bool beating = true;
        selected = 0;
        begin = 0;
        end = folderFile.Length;
        while (beating == true)
        {
            ImageListener.Instance.ReceiveImage(string.Format(@"{0}", imagefile));
        }


    }

    public static void timer_Tick(object sender, EventArgs e)
    {
        ChangeImage();
    }

    public static void ChangeImage()
    {
        if (selected == folderFile.Length - 1)
        {
            selected = 0;
            imagefile = (folderFile[selected]);
        }
        else
        {
            selected = selected + 1;
            imagefile = (folderFile[selected]);
        }
    }
  • 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-07T06:07:20+00:00Added an answer on June 7, 2026 at 6:07 am
    1. Add the image to your project
    2. Right-click the image – click Properties
    3. In the properties window, set the Build Action to Embedded Resource

    If, for example, the picture you added was called MyPictureName.jpg in a folder called Resources in the assembly MyAssemblyName, you would do the following:

    var stream = Assembly.GetExecutingAssembly()
        .GetManifestResourceStream("MyAssemblyName.Resources.MypictureName.jpg");
    
    pictureBox1.Image = new Bitmap(stream);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Made a program retrieving .txt files from a folder. Each .txt files contains 1
I have made a project in which i have added a splash screen by
I made an iphone app to capture image from camera and to set that
I made a splash screen and used a runnable thread to parse a xml
I want to make a splash screen in my application, for that i need
I made a splash image to show at the start of my activity.. The
I made an application that passes trough an XML file and extracts the entries
I made a little PHP script that checks if an email is valid. The
Made an app targeting API8 and it's running fine on all emulator images all
Made some changes to my Django app's model and used South to migrate them

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.