C# Animated Rain Loading Form | Timer

Поділитися
Вставка
  • Опубліковано 6 лют 2025

КОМЕНТАРІ • 45

  • @Dadadadam999
    @Dadadadam999 3 роки тому +5

    Cool video! ^_^
    You can create a Blob class that will hide the logic in itself.
    You can also use forech.
    You can use the up and left margins to avoid creating a new point all the time.)
    Examples.
    • Class file:
    public class Blob
    {
    public int Speed { get; set; } = 0;
    public PictureBox View { get; set; }
    public void Move()
    {
    View.Top += Speed;
    if (View.Top > View.Parent.Height + View.Top)
    View.Top = 0 - View.Top;
    }
    }
    • Init blobs:
    List blobs = new List();
    blobs.Add(new Blob { Speed = 4, View = pictureBox3 });
    blobs.Add(new Blob { Speed = 6, View = pictureBox4 });
    blobs.Add(new Blob { Speed = 8, View = pictureBox5 });
    blobs.Add(new Blob { Speed = 3, View = pictureBox6 });
    blobs.Add(new Blob { Speed = 5, View = pictureBox7 });
    blobs.Add(new Blob { Speed = 6, View = pictureBox8 });
    blobs.Add(new Blob { Speed = 7, View = pictureBox9 });
    blobs.Add(new Blob { Speed = 4, View = pictureBox10 });
    • In timer:
    forech(Blob blob in blobs)
    blob.Move();

    • @CodeFlowYT
      @CodeFlowYT  3 роки тому +1

      That's right. I'm planning to do a refactor video of my older codes in near future. Anyway, thanks for the code :)

    • @Dadadadam999
      @Dadadadam999 3 роки тому +1

      @@CodeFlowYT It's a good idea for a video.
      Your old videos on UA-cam recommendations. :)
      P.S. Thanks for the design ideas. :)

  • @imaansarwar8845
    @imaansarwar8845 5 років тому +8

    Thank You So Much It Runs Successfully :)

    • @CodeFlowYT
      @CodeFlowYT  5 років тому +2

      sorry for slow respons. glad to hear that ;)

  • @jackzhang996
    @jackzhang996 5 років тому +3

    Thank you. You did a good job.

  • @_zviger_
    @_zviger_ 4 роки тому +7

    the rain is undoubtedly beautiful, but why did you decide to write such code through a "switch"? It seems to me that it will be easier this way:
    List pictures = new List()
    {
    pictureBox3, pictureBox4, pictureBox5, pictureBox6,
    pictureBox7, pictureBox8, pictureBox9, pictureBox10
    };
    for (int i = 0; i < pictures.Count; i++)
    {
    pictures[i].Location = new Point(pictures[i].Location.X, pictures[i].Location.Y + rainSpeeds[i]);
    if (pictures[i].Location.Y > panel1.Size.Height + pictures[i].Size.Height)
    pictures[i].Location = new Point(pictures[i].Location.X, 0 - pictures[i].Size.Height);
    }
    although maybe I still don't understand anything in this language

    • @CodeFlowYT
      @CodeFlowYT  4 роки тому +3

      you're right. actually I laughed my self everytime I see code on my videos :D

  • @indominous_rexx3806
    @indominous_rexx3806 3 роки тому

    how to do it with c++ clr

  • @Cay4everr
    @Cay4everr 2 роки тому

    How do I make it to where it opens a different form and closes the rain form?

  • @rodrigooliveira435
    @rodrigooliveira435 3 роки тому

    Perfect!!!!

  • @antivanced2382
    @antivanced2382 3 роки тому

    NICEEEEEEE

  • @ichbinayhan
    @ichbinayhan 5 років тому +1

    this is so cool

  • @salmon_tt
    @salmon_tt 4 роки тому

    Thanks!

  • @mariezupan9166
    @mariezupan9166 5 років тому +2

    Please keep up the good work!

  • @ethan-to5qy
    @ethan-to5qy 3 роки тому

    love it! using this in my app

    • @CodeFlowYT
      @CodeFlowYT  3 роки тому

      Thanks. I'll be releasing a refactored version of this video soon. Please stay tuned

    • @ethan-to5qy
      @ethan-to5qy 3 роки тому

      @@CodeFlowYT sounds great! ill watch it

    • @CodeFlowYT
      @CodeFlowYT  3 роки тому

      @@ethan-to5qy the vid is live now. here: ua-cam.com/video/3AusyetMBgE/v-deo.html, hope you like it :)

  • @sakom8479
    @sakom8479 3 роки тому

    it works but how do i get a diffrent form to load after the timer is done also - points for no exit button

    • @axsync
      @axsync 3 роки тому

      put the code in timer:
      if (yourpercentagelabelname.Text = "100%")
      {
      timer1.Stop();
      this.Hide();
      YourFormNameThatYouWantToLaunchAfter Form = new YourFormNameThatYouWantToLaunchAfter;
      Form.Show();
      }

    • @8ndj
      @8ndj 2 роки тому

      ik this is late but
      YourForm form YourForm;
      this.hide( );
      form.Show( );

  • @rohancooper5509
    @rohancooper5509 5 років тому +1

    Great !

  • @efratajo434
    @efratajo434 4 роки тому

    Thank you for your effort

  • @burakonur8
    @burakonur8 4 роки тому

    Thank you

  • @Дмитрийм-л7ф
    @Дмитрийм-л7ф 5 років тому +1

    Спасибо

  • @ceritafilm2937
    @ceritafilm2937 4 роки тому

    Mantapppp, bikinin dasar C# nya dong om di pukis kaga ada wkwk

    • @CodeFlowYT
      @CodeFlowYT  4 роки тому

      wkwk siapp kalau ada waktu ya ka :D

    • @ceritafilm2937
      @ceritafilm2937 4 роки тому

      @@CodeFlowYT sippp ditunggu heheh

  • @Thepostroun
    @Thepostroun 4 роки тому

    nice.

  • @freelarabie3218
    @freelarabie3218 5 років тому +2

    Very Good, Thank you very mush Friend....

  • @bharatimishra6250
    @bharatimishra6250 4 роки тому

    hello sir,make a tutorial on float login in input box animated ,thankyou

  • @FAELparafall
    @FAELparafall 4 роки тому

    Thanks you so much

  • @KenySama1
    @KenySama1 4 роки тому

    12:37

  • @reversesunlight9670
    @reversesunlight9670 5 років тому

    can you do this with vb.net?

  • @imaansarwar8845
    @imaansarwar8845 5 років тому

    D11Import and EntryPoint gives an error what shall I do ?

    • @damkan8232
      @damkan8232 4 роки тому +1

      Look in the windows search engine for the "repos" folder then inside it look for the name of your project and go to bin / debug / and put gdi32.dll
      put this: es.dll-files.com/gdi32.dll.html
      sorry for my bad inglish , i use google translate.

    • @imaansarwar8845
      @imaansarwar8845 4 роки тому

      Thanks resolved it that time.

  • @krissloo143
    @krissloo143 4 роки тому

    Why not use an array of picture boxes :)