PART 1 | How To Create a Calendar in C#.NET Windows Form using UserControl

Поделиться
HTML-код
  • Опубликовано: 11 окт 2021
  • Thanks for watching. If you liked this video, make sure to subscribe for more
    PART 2
    • Part 2 | How to Create...
    PART 3
    • Part 3 | How to Create...
  • НаукаНаука

Комментарии • 177

  • @coding_ideas
    @coding_ideas  2 года назад +9

    Hello guys, please subscribe to my channel if my video help you. I will upload more tutorials and ideas.

    • @Guide4Ever
      @Guide4Ever 2 года назад +3

      What did you do at 9:20 ...what did you press to do thing you did?

    • @coding_ideas
      @coding_ideas  2 года назад +2

      @@Guide4Ever hello sir, i only deleted those panel i added inside flowlayout. i only added those panels to get thr right size of the usercontrol.
      I will try to add commentary or text to my upcoming tutorials.

    • @Guide4Ever
      @Guide4Ever 2 года назад

      @@coding_ideas Thank you! :)

    • @PradeepKumar-cq1dz
      @PradeepKumar-cq1dz 2 года назад

      How to movie next year??

    • @coding_ideas
      @coding_ideas  2 года назад

      @@PradeepKumar-cq1dz What do you mean? Movie?

  • @nou571
    @nou571 Год назад +17

    so instead of copying and pasting that entire method's code, you can just declare static variables at the top of the class for the form so that they are accessible like so:
    static DateTime currentDT = DateTime.Now;
    static int currentYear = currentDT.Year;
    static int currentMonth = currentDT.Month;
    and for the next button all you have to do is write these three lines:
    ("displayDays" is my method name for creating the user control by the way (where the two for loops are).)
    dayContainer.Controls.Clear();
    currentMonth += 1;
    displayDays();
    and finally for the previous button you can do:
    dayContainer.Controls.Clear();
    currentMonth -= 1;
    displayDays();
    then if you want the year to update after december just set a condition in the button click method for either button where if the current month is equal to 1 or 12 you can increment or decrement the year by 1.

    • @user-ks2hn9tt8p
      @user-ks2hn9tt8p 10 часов назад

      private void DisplayDays()
      {
      int days = DateTime.DaysInMonth(currentYear, currentMonth);
      DateTime startOfMonth = new DateTime(currentYear, currentMonth, 1);
      int dayOfWeek = ((int)startOfMonth.DayOfWeek + 6) % 7; //monday start
      for (int i = 0; i < dayOfWeek; i++)
      daysContainer.Controls.Add(new dayBlock());
      for (int i = 1; i

  • @BashtechDev
    @BashtechDev 2 года назад

    THANK YOU SO MUCH, I'VE BEEN LOOKING FOR SOMETHING LIKE THIS FOR A LONG TIME.!!

  • @cutecustomshirtstshirts918
    @cutecustomshirtstshirts918 2 года назад

    Thank you for sharing the knowledge. keep up the good work!

  • @nicolahoward8712
    @nicolahoward8712 2 года назад +3

    Thank you very much for this video. I have been trying to find a way to create a calendar such as this for a very long time. Please keep up the good work.

    • @coding_ideas
      @coding_ideas  2 года назад

      You're welcome ☺️. And thank you for watching my video.

  • @charlenealmuete6417
    @charlenealmuete6417 2 года назад +1

    Thank you!!! So informative.

  • @doomslayerinc.7654
    @doomslayerinc.7654 Год назад

    Good video! Helped me a lot! But how did you get the individual dates into separate boxes?

  • @albayrak96
    @albayrak96 2 года назад +17

    You can use this for error.
    (button_click events)
    (decrease)
    if (month==1)
    {
    month = 13;
    year--;
    }
    month--;
    and
    (increase)
    if (month==12)
    {
    month = 0;
    year++;
    }
    month++;
    At some point in the program you want the 0 or 13th month name and we get the error.

    • @felixandro1512
      @felixandro1512 Год назад

      aga merhaba bu kodu nereye yazıcaz tam olarak? bir de yazınca bu sefer ayları 2şer 2şer atlamaya başlıyo bunun çözümünü biliyo musun

    • @albayrak96
      @albayrak96 Год назад +1

      @@felixandro1512 2 tane butonun var birisi ay'ı artırıyor diğeri azaltıyor. Ay değerleri de sayı olarak tutuluyor sen o sayının hangi aya denk geldiğini isim olarak alıyosun. Eğer bu belirttiğim kodu yazmazsan ay değeri 1 iken yani Ocak ayında sen Ay değerini azalttığında 0. ay diye bişe olamayacağı için program hata verir. Veya aynı şekilde tam 12. ayda iken sen Ay değerini artırırsan 13. ay yine hata verir. Bu kodu 2'ye bölüp birini ayı artıran butonun click olayına diğerini ay'ı azaltan butonun click olayının en üstüne yazarsan bu sorun çözülür. 2şer 2şer artmasının sebebi month-- veya month++ diye artıran bi kod daha vardır. Onu silmen gerekir benim yazdığım kod zaten kendisi artırıp azaltıyor. (decrase) yazan kod kısmı ay'ı azaltan butona (increase) yazan kod ay'ı artıran butona yazılacak.

    • @felixandro1512
      @felixandro1512 Год назад

      @@albayrak96 hocam onu hallettim teşekkürler. Şuan uygulama tamam bir sıkıntı yaşıyorum onu bi söylesem. Sql Server kullanıyorum. Takvime kaydettiğim notlar takvimin üzerinde kalmıyor. Ve sqlde en son ne kayıtlıysa onu yazıyor tüm tıkladığım günlere. Başka bir şey yazdığımda sqle kaydediyor ancak takvimin üzerinde o notu göstermiyor. Hata nerde olabilir çözüm nedir sizce

    • @albayrak96
      @albayrak96 Год назад

      @@felixandro1512 Bunu böyle cevaplamak biraz zor yazdığın kodu ve sql tablonu görmek gerekiyor belki sql'e veri gönderirken hatalı gönderiyo olabilirsin veya sorguda hata olabilir. Sql tablonuzda tarih verisini date olarak mı tutuyosunuz?

    • @felixandro1512
      @felixandro1512 Год назад

      @@albayrak96 datetime olarak tutuyorum

  • @lmegalomanial
    @lmegalomanial 2 года назад

    THANK U!! u safed me!!!! it didn't work out for me at the beginning, but I removed +1 from the line, i found a my mistake, and everything came out! good luck to you! your videos are very good, I hope you will continue to do video lessons

    • @tymofii9550
      @tymofii9550 Год назад

      what mistake did you have? Because I have troubles at the beginning :(

  • @ravenjugalbot2170
    @ravenjugalbot2170 2 года назад

    Great Tutorial!! Thank you bro!

  • @Adam-eq4sp
    @Adam-eq4sp 2 года назад

    Thank you made my day

  • @jporto6204
    @jporto6204 10 месяцев назад

    Excelent!!, one question : How can I do to record appointments but for the entire series of a specific day?

  • @shainamae2857
    @shainamae2857 2 года назад +1

    Thank you so much po! God bless. 🥰

    • @coding_ideas
      @coding_ideas  2 года назад +1

      You are welcome☺️. God Bless sa capstone niyo. Laban lang :) .

    • @shainamae2857
      @shainamae2857 2 года назад

      @@coding_ideas Thank youuuu po talagaa.

  • @DolfoROG
    @DolfoROG 2 года назад

    when I open the code, instead of showing just a short section with Form1_Load, several sections appear, one for each panel I created, referring to the day of the week, why does this happen?

  • @Account-se4oc
    @Account-se4oc 4 месяца назад

    for anyone wondering if u want the calendar to go to next and previous years u can add this below the month++ and month--
    month--;
    if (month == 0)
    {
    month = 12;
    year--;
    }
    month++;
    if (month == 13)
    {
    month = 1;
    year++;
    }

  • @josephdube8958
    @josephdube8958 Год назад

    Hi! Very great video and helped me a lot with a project that I did. I was wondering if you could tell me or point me in the right direction on how to have a calendar for only week by week, instead of the whole month.

    • @coding_ideas
      @coding_ideas  Год назад

      Hello, Thanks for watching. Im glad that it helped you. I havnt figure it out yet on how to create a calendar by week, if i have free time i can try to make one :). Just try to play with usercontrol class maybe it will help

  • @albertmariano5872
    @albertmariano5872 2 года назад

    sir how to fix this error for the UserBlankControl it shows "System ArgumentExceptions:Top-level control cannot be added to a control

  • @tymofii9550
    @tymofii9550 Год назад

    thx for the video mate!

  • @King-ns3jm
    @King-ns3jm 2 месяца назад

    I have a question. I transfer this storage device to WPF, and when I open the full window, the grid gets lost and there is a discrepancy between the days of the week. How can I fix this?

  • @omarestran7315
    @omarestran7315 Год назад

    Good morning, very good tutorial, my question: How can you fill in the blank controls with the days before, greetings from Argentina.

  • @isaiasfranciscodasilva644
    @isaiasfranciscodasilva644 Год назад +3

    Great tutorial, not wanting to abuse it, but I would like to color the current day in the calendar and Sundays in red.

    • @coding_ideas
      @coding_ideas  Год назад +1

      hello, Sorry for the delayed response.
      declare a static variable for your month and year in your
      main form, and assign a value.
      example :
      staticMonth = currentMonth;
      staticYear = currentYear;
      and in your UserControl Days.
      create current date variable
      example :
      currentDate = MainForm.staticMonth + "/" + lbday.text + "/" + MainForm.staticYear;
      and compare the currentDate and dateToday. if both are equal u can customize UserControl.

    • @isaiasfranciscodasilva644
      @isaiasfranciscodasilva644 Год назад

      In this follow-up is a lot of work, thank you very much for your feedback.

    • @srvlee827
      @srvlee827 Год назад

      @@coding_ideas
      I'm sorry. Please explain in more detail.

    • @kausarfatima4371
      @kausarfatima4371 Год назад

      It's giving error on writing daycontainer.Controls.Add(ucblank)

  • @HuycuongATTT
    @HuycuongATTT 11 месяцев назад +5

    Hello, at 9:21. What's going on, you're doing a cut?

    • @KalgoEmpyo
      @KalgoEmpyo Месяц назад

      i have the same question

  • @mohammadakbarzadeh9029
    @mohammadakbarzadeh9029 Месяц назад

    Hello. Please help me. How can I display the selected date on the FlowLayoutPanel form?❤❤❤

  • @hpnegro6015
    @hpnegro6015 2 года назад

    Gracias me salvaste el día

    • @coding_ideas
      @coding_ideas  2 года назад

      You're welcome :), please subscribe to my channel :)

  • @DanCodingASAP
    @DanCodingASAP Год назад

    How come I cant find WinFormsApp on my new project templates?

  • @salmanrizwan9076
    @salmanrizwan9076 Год назад

    For me the 31st date of the month is not show only till 30th
    Any solution.

  • @nikolaamber9972
    @nikolaamber9972 Год назад

    У вас отсчет дней недели идёт с воскресенья, получаетсч с 1 дня по 6, а у нас 7 дней недели, начиная с понедельника, как быть?

  • @rubenespinoza7400
    @rubenespinoza7400 2 года назад

    I have a problem the last day of the month is not shown.

  • @berbafan67
    @berbafan67 Год назад +2

    The months that end on a Saturday cause an issue. Next month starts on a Monday, instead of a Sunday. Any suggestions?

    • @berbafan67
      @berbafan67 Год назад +3

      if anyone has the same issue, add the following before the daysOfTheWeek loop:
      if (daysOfTheWeek == 0)
      {
      daysOfTheWeek = 7;
      }

    • @KieranAG
      @KieranAG Год назад

      @@berbafan67 Thank You!

  • @nikachakvetadze8499
    @nikachakvetadze8499 Год назад +1

    Hi! Do you have uploaded code example githib or gitlab?

    • @coding_ideas
      @coding_ideas  Год назад

      Hello, Thanks for watching. I dont upload my tutorials on github yet because i need to reach youtube watch hours for now :) . I hope u understand.

  • @flaviusioan69
    @flaviusioan69 Год назад

    hy...how can this be made Responsive ?

  • @matango6133
    @matango6133 Год назад

    I'm really confused about how you made "DateTimeFormatInfo" work.

  • @junaidhussain165
    @junaidhussain165 Год назад

    I can’t figure out an issue I have come across. When you go to next year, if the 1st of January falls on a Sunday it adds it on as Monday, but from February onwards the dates are correct. how can I resolve this issue?

    • @Steve-pm4mh
      @Steve-pm4mh Год назад +1

      u need to add
      if (daysOfTheWeek == 0)
      {
      daysOfTheWeek = 7;
      }
      before the loop to add black usercontrols

  • @idev91
    @idev91 2 года назад +1

    I am getting everything right! Except that it always starts from the top left corner (My Calendar starts with Monday), no matter which month it is!
    Maybe you have a hint!

    • @coding_ideas
      @coding_ideas  2 года назад +1

      Hello, Have you added a blankUserControl and create a loop? And if u start your week with monday, try to remove the (+1) i added at thr dayofthrweek.
      Good luck.

    • @idev91
      @idev91 2 года назад

      @@coding_ideas it works now, thanks for your support!

  • @Julia-lo3tt
    @Julia-lo3tt Год назад +2

    At 11:23 : Somehow it doesn't show the User Control stuff, but just the plain form with the names of the days of the week. Is there a way to fix it?

    • @iredderpvp7094
      @iredderpvp7094 Год назад

      have a same problem, do you know how to fix it?

    • @Julia-lo3tt
      @Julia-lo3tt Год назад

      @@iredderpvp7094 Sadly no, it just doesn't work for me😢

    • @XeSoupX
      @XeSoupX Год назад +3

      Hi, I ran into this issue as well on my end and was wondering why this was happening. Turns out the Form1_Load method (where displayDays is being called) was not bound to the actual form... hence a blank form is displayed with no user controls, so displayDays is also never called. To fix this, you need to bind the form to the Form1_Load method under the Events section under the form's properties in the "Load" attribute. Then user controls will be displayed!

  • @humbetojosepenaruiz4297
    @humbetojosepenaruiz4297 Год назад

    buenas me parecio muy ineteranse tu calendario y si deseo hacer un ingreso multiple de varioa dias

  • @SkyNest01
    @SkyNest01 2 года назад +1

    Hello, great video, but i have a problem. For some reason my version doesnt show 31st(im doing this in december)
    Do you know why?

  • @Yvngsick
    @Yvngsick Год назад

    how can i do this with a week view with time on the y axis, like a timespan which events get adjusted to

    • @coding_ideas
      @coding_ideas  Год назад +1

      I dont know how to do it yet. I will try if i have free time

    • @Yvngsick
      @Yvngsick Год назад

      @@coding_ideas thanks. Keep up the Great work

  • @gloriafulguera3869
    @gloriafulguera3869 2 года назад

    I dont understand line 35 (int = dayOfTheweek)

  • @ashkurosaki7028
    @ashkurosaki7028 4 месяца назад

    Why the daycontainer is not working on me

  • @jongcombo6494
    @jongcombo6494 2 года назад +5

    Add source code, please...

  • @user-lc9bd2kp7k
    @user-lc9bd2kp7k Год назад

    At 10:50 you type in daycontainer.Controls.etc.etc. Yet, I have followed your build to a T and and DayContainer doesn't exist. You have mentioned in only comments that it's in FlowLayoutPanel yet it isn't. I have built and rebuilt this calendar following your design. Is there a unique template that houses this Daycontainer. Please be a detailed as you can and say where/how exactly we can get daycontainer to work.

    • @coding_ideas
      @coding_ideas  Год назад +3

      I apologize for the confusion. 'Daycontainer' is the name of my flowlayout. If 'daycontainer' does not exist in your project, please check the name of your flowlayout.

  • @zulkarneyneryilmaz1600
    @zulkarneyneryilmaz1600 6 месяцев назад

    Hello, your video is very nice, but I cannot move on to the next year, I am getting an error, can you help me?
    Error message!
    System.ArgumentOutOfRangeException: 'Year, Month and Day parameters create a DateTime value that cannot be represented.'

    • @tredsolei
      @tredsolei 5 месяцев назад

      in btnprevious_Click use should add:
      if (month > 12)
      {
      month = 1;
      year--;
      }
      and btnnext_Click will change into year++

  • @user-zn5dd2ng3d
    @user-zn5dd2ng3d 20 дней назад

    What he did exactly ruclips.net/video/tY8_GE6NRYA/видео.html when he marked all those containers?

  • @matias-5050
    @matias-5050 Год назад +4

    what you press in 9:19?

  • @Guide4Ever
    @Guide4Ever 2 года назад

    Some commentary would really be useful, I hope you consider this. Well done on tutorial nonetheless.

    • @coding_ideas
      @coding_ideas  2 года назад

      Thank you :)

    • @Strappa71
      @Strappa71 2 года назад

      @@coding_ideas The subjects of your videos are excellent. I would live to learn this stuff from you. But, that requires that you actually explain what you are doing and why. Thare are already way too many "music"-tutorialls on RUclips, I just close and search for the reals ones with voice commentary. Please consider re-doing them with voice commentary instead.

  • @antoniomachadosantos8324
    @antoniomachadosantos8324 2 года назад +2

    Hi! good video. But i had a question, putting the:
    for (int i = 1; i < dayoftheweek ; i++){
    ...
    }
    Don't show the panel, i dont know why, can you help me plis??
    *Im suscribed

  • @samanthamilanezmadrigal4304
    @samanthamilanezmadrigal4304 2 года назад

    Hello, how did you get to the next year? I get an error after december 2021 cause its says its out of range, very usefull video

    • @coding_ideas
      @coding_ideas  2 года назад +2

      Hello, you can create a condition if it reach december 2021, increment the year :) if month > 12(month)
      increment year.

    • @samanthamilanezmadrigal4304
      @samanthamilanezmadrigal4304 2 года назад +1

      @@coding_ideas it worked, thank you! Great videos :D

    • @romualdas9653
      @romualdas9653 2 года назад

      @@samanthamilanezmadrigal4304 Can you help me with this problem and share where and what did you write? Thank you so much

    • @samanthamilanezmadrigal4304
      @samanthamilanezmadrigal4304 2 года назад +2

      @@romualdas9653 he added the code in one of the comments below, you have to create a condition so the year increases or decreases depending on the month. Here's the code to increase the year
      year = DateTime.Now.Year;
      if (month != 12)
      {
      month++;
      }
      else {
      month = 1;
      year++;
      }

    • @romualdas9653
      @romualdas9653 2 года назад

      @@samanthamilanezmadrigal4304 I am sorry for interupting, I am pretty new in this and I cant find place where to put it..

  • @tantan-ol4nj
    @tantan-ol4nj Год назад

    hi need help at 11:20 temporary text does not show for me even if I copied the whole code please help!

  • @codeelo
    @codeelo 2 года назад

    Removing and adding UserControls every time is bad for performance. In my calendar implementation (on the channel), all days are redrawn. This takes away the annoying flickering . 😋

    • @baynaamn
      @baynaamn Год назад

      can you share the code

    • @codeelo
      @codeelo Год назад

      @@baynaamn on my channel

  • @jineetmaharajwala8339
    @jineetmaharajwala8339 Год назад

    @Coding Ideas cant access the daycontainer function. How can we access that?

    • @coding_ideas
      @coding_ideas  Год назад

      I apologize for the late reply. Daycontainer is the name of the flowlayout panel.

  • @ashishsambre4232
    @ashishsambre4232 2 года назад

    What are you doing at 9.20 timing in daycontainer

    • @ashishsambre4232
      @ashishsambre4232 2 года назад

      After December and January I am facing error can you help

  • @kokosibg1683
    @kokosibg1683 Год назад +1

    Can somebody explain me what is he doing here 9:14

  • @goodluckmate_3420
    @goodluckmate_3420 4 месяца назад

    at 9:22 what did you do did you just delete everything or what i cant understand

  • @xeliotrop
    @xeliotrop Год назад +1

    11:00 how did you create daycontainer?

  • @thiagorossii77
    @thiagorossii77 2 года назад +1

    Thank you, can you please put a link so we can download the project, thanks!

  • @stevenlippert7191
    @stevenlippert7191 Год назад +4

    Your coding type is terrible, but for beginner its clearly to understand. but instead of using the same code block 3 times and have 2 exact same events for the buttons, i would create one Event for all buttons and let them access dynamically.
    private void ForwardOrBackward(object sender, EventArgs e)
    {
    Button button = sender as Button;
    switch (button.Name)
    {
    case "BtnNext":
    month++;
    if (month == 13)
    {
    year++;
    month = 1;
    }
    break;
    case "BtnBack":
    month--;
    if (month == 0)
    {
    year--;
    month = 12;
    }
    break;
    }
    daycontainer.Controls.Clear();
    DisplayDays();
    }
    private void Form1_Load(object sender, EventArgs e)
    {
    now = DateTime.Now;
    month = now.Month;
    year = now.Year;
    DisplayDays();
    }
    void DisplayDays()
    {

    DateTime startOfTheMonth = new DateTime(year, month, 1);
    LbMonth.Text = startOfTheMonth.ToString("MMMM").ToUpper() + " | " + year;
    int days = DateTime.DaysInMonth(year, month);

    int dayOfTheWeek = Convert.ToInt32(startOfTheMonth.DayOfWeek.ToString("d")) + 6;
    if (dayOfTheWeek >= 7)
    dayOfTheWeek -= 7;
    for (int i = 1; i < dayOfTheWeek; i++)
    {
    UserControlBlank ucBlank = new UserControlBlank();
    daycontainer.Controls.Add(ucBlank);
    }

    for (int i = 1; i

    • @coding_ideas
      @coding_ideas  Год назад +1

      Hello Steven, Thank you for the comment . You're right, it seems terrible way of coding but the target of my videos is beginners. so that they can create beautiful applications with a simple and easy to understand method, and it is up to them to improve the method of coding. have a nice day and happy coding :)

  • @tomfarley6352
    @tomfarley6352 2 года назад

    Hello, really good tutorial but how can the previous button go back to the previous year?

    • @coding_ideas
      @coding_ideas  2 года назад +1

      Decrement the year

    • @tomfarley6352
      @tomfarley6352 2 года назад

      @@coding_ideas from what to what?

    • @coding_ideas
      @coding_ideas  2 года назад +2

      @@tomfarley6352 create a condition when u clicked previous on january. Decrement the year and set the month to 12. If(month

    • @tomfarley6352
      @tomfarley6352 2 года назад

      @@coding_ideas I will try this, thank you for replying! 👍🏻

    • @felixandro1512
      @felixandro1512 Год назад

      @@tomfarley6352 if you did it can you share the code with me?

  • @tamtrinh5154
    @tamtrinh5154 2 года назад +4

    what did u do in 9:17 ?

    • @coding_ideas
      @coding_ideas  2 года назад +2

      I just removed the panel i added :) . I only put those panels to get the right size of the usercontrol :) .

    • @dandeoliveira
      @dandeoliveira Год назад +1

      @@coding_ideas The thing is that the loop is not showing the usercontrolblank into the calendar.

    • @coding_ideas
      @coding_ideas  Год назад

      check ur loop if u add the usercontrolblank controls to ur container. ucdayscontainer.controls.add(usercontrolblank).

  • @alephsayson
    @alephsayson Месяц назад

    I do not understand where daycontainer came from in 11:55

    • @DaniloDerio
      @DaniloDerio Месяц назад

      It is the name of the panel he created at the start

  • @_r3tro.g
    @_r3tro.g 11 месяцев назад

    what did you do in 9:15?

    • @coding_ideas
      @coding_ideas  11 месяцев назад

      I simply select and delete all panels inside the main panel.

  • @TuanTrongDong
    @TuanTrongDong 2 года назад

    11:27 i don't know but in my laptop it is not show userControlBlank ?

    • @coding_ideas
      @coding_ideas  2 года назад

      what do u mean by it does not show usercontrolblank ?

    • @user-uz9jj1mc2t
      @user-uz9jj1mc2t 2 года назад

      how did you solve this problem?

    • @Julia-lo3tt
      @Julia-lo3tt Год назад

      Have the same problem right here, did you figure out a way to fix it?

  • @yaserozdemirr
    @yaserozdemirr 5 месяцев назад

    08:51 are you delete all ? or something

    • @coding_ideas
      @coding_ideas  5 месяцев назад

      I apologize for the incomplete instruction. Yes, I deleted everything. I just placed it there as a guide to determine the proper size of the user control days

  • @karljanssendeguzman3107
    @karljanssendeguzman3107 11 месяцев назад

    Hello how to do that 9:16 ?

    • @coding_ideas
      @coding_ideas  11 месяцев назад

      I simply select all the panels within the main panel and delete all of them.

  • @garrettclark5635
    @garrettclark5635 6 месяцев назад +2

    at 9:20, what did you do?

  • @PradeepKumar-cq1dz
    @PradeepKumar-cq1dz 2 года назад

    How to movie next year??

    • @user-mo5wt4ue2r
      @user-mo5wt4ue2r 2 года назад +2

      ...
      month++;
      if (month == 12)
      {
      year++;
      month = 1;
      }
      DateTime StartOfTheMonth = new DateTime(year, month, 1);
      ...

    • @felixandro1512
      @felixandro1512 Год назад

      @@user-mo5wt4ue2r it helped but now i can't switch to December. Any helps?

    • @user-mo5wt4ue2r
      @user-mo5wt4ue2r Год назад

      @@felixandro1512 can you write the code?

    • @felixandro1512
      @felixandro1512 Год назад

      @@user-mo5wt4ue2r i solved it thx anyway

    • @Ki-tk9
      @Ki-tk9 4 месяца назад

      @@user-mo5wt4ue2r
      Hello, there is still an error
      ' int days = DateTime.DaysInMonth(year, month); ' error=>System.ArgumentOutOfRangeException: 'Year, Month, and Day parameters describe an un-representable DateTime.'
      . How to solve this?

  • @user-oj7nt2tp1g
    @user-oj7nt2tp1g 2 года назад

    what can i do if my computor dont know what is daycontainer?

    • @coding_ideas
      @coding_ideas  2 года назад

      Daycontainer is a flowlayout control

    • @user-oj7nt2tp1g
      @user-oj7nt2tp1g 2 года назад

      @@coding_ideas what is a flowlayout control?

    • @salmanrizwan9076
      @salmanrizwan9076 2 года назад

      @@user-oj7nt2tp1g You can use the flowlayoutpanel from the tool box and drop it in the design

  • @StephenWebb1980
    @StephenWebb1980 3 месяца назад

    lol. ugh.