Custom DateTimePicker - WinForm C#

Поделиться
HTML-код
  • Опубликовано: 14 май 2021
  • 🎬 [ Custom controls in Windows Forms and C# ]
    ⏮ PREVIOUS: Custom Button (Rounded) • Custom Button - Rounde...
    ⏭ NEXT: Custom RadioButton • Custom RadioButton - W...
    ▶ CURRENT VIDEO: How to create a custom Date Picker?
    In this tutorial, you will learn how to create a Custom Date Picker with customizable appearance properties, such as changing the background color, border color, text color, border thickness, and more, as well as maintaining the essential properties and events of the control. .
    🔰 Get Code
    rjcodeadvance.com/custom-date...
    🎦 See all custom controls:
    • Custom Controls C#
    😸Social networking
    Facebook: / rjcodeadvanceen
    Instagram: / rjcodeadvanceen
    🎁 GET RJ CODE MODERN UI - M1 (55% OFF) [ C# || VB.NET ]
    Learn how to create Custom Forms + Custom Controls + Theme and Style Settings
    - Get Project: rjcodeadvance.com/tienda/
    - Download Demo: drive.google.com/uc?id=1uo3yw...

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

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

    Really appreciate the tutorials on custom controls, really enjoy these. Ty !

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

    Harika eğitim videoları hazırlamışsınız. Çok arayıp bulamadığım konuları anlatmışsınız. Harikasınız, teşekkür ederim.

  • @jogostipassimlol9332
    @jogostipassimlol9332 3 года назад

    Finalmente voltando a ação! Estava com saudades dos seus vídeos, principalmente o espanhol

  • @adamonjourney3726
    @adamonjourney3726 3 года назад +1

    Thanks again for this great tutorial!

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

    Excelente material estimado, se podria modificar el estilo de los días y las flechas para recorrer los meses?

  • @mostafaelghoul
    @mostafaelghoul 3 года назад +1

    really thanks
    it will be great if you can help with the Data grid view

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

    Thank you so much

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

    Is there any way you can change the background color of the expanded view that appears when you click the control?

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

    Hey, great tutorials! Have already learned a lot. However, I have problems with the "MonthCalendar", which pops up when you want to select the date, also adapt to the design. With the "MonthCalendar" element I have made progress. Maybe it would be possible to make a tutorial for it. It would make me very happy! Thanks a lot for the many tutorials!

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

    Thats great tutorial. You were very useful. Could you tell us how to have BorderRadius in the DateTimePicker?
    Excelente tutorial, me ha sido de mucha ayuda. Podrías decirnos cómo tener puntas redondeadas en el DateTimePicker?
    Gracias, saludos!

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

      Hola, gracias por mirar los videos. Bueno si es posible, se hace de manera similar como se hizo el cuadro de texto con esquinas redondeados. Revise el video anterior.

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

    Thanks You !
    But Text is overwritten how can I click on the text to edit the text as it was?

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

    Thanks very useful your videos, really thanks.
    Could you make a video for creating a 3D button?

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

    Hello, thank you very much, I did it and it worked for me, but I have a question, how can I continue using the keyboard to scroll up and down the month and year? I can't select it with the mouse, thanks.
    Hola, muchas gracias, lo hice y me sirvió, pero tengo una pregunta, como puedo hacer para poder seguir usando el teclado para subir y bajar el mes y el año? No lo puedo seleccionar con el mouse, gracias.

  • @KKSolutions-zz8zw
    @KKSolutions-zz8zw 29 дней назад

    Interested with this job congrats... passible to do using VB pls share the tutorial... thx...

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

    When I use this code I get an error that pops up saying I do not have permission/access is denied once I build the program. I have tried creating the .cs file twice and I can get the program to run and have the DatePicker work. However once I begin adding more UI features this error pops up. This also popped up when I created a CustomButton.cs file on a the same project.

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

    Great tutorial. but i have a question how can i change the position of the calendar icon from right to left ?

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

      In this Line the icon is drawn:
      //Draw icon
      graphics.DrawImage(calendarIcon, this.Width - calendarIcon.Width - 9, (this.Height - calendarIcon.Height) / 2);
      The first parameter is the icon, then X and Y, You can do something like this:
      graphics.DrawImage(calendarIcon, 3 , (this.Height - calendarIcon.Height) / 2);
      You have to to the same with the text, move the X to the right..

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

    v good

  • @cristiamrivera9266
    @cristiamrivera9266 3 года назад +1

    Excelente tutorial
    Esperamos en español

  • @apologjohnpaula.7717
    @apologjohnpaula.7717 2 года назад

    What if I use only this to select time and I want the calendar icon to disappear?

  • @DK-ij9sh
    @DK-ij9sh 2 года назад

    Great tutorial.
    Can we get Time as an input through this DateTimePicker instead of showing a calendar?

  • @user-lz4pi6fo7q
    @user-lz4pi6fo7q 11 месяцев назад

    how can to enable input date manually using keyboard, its hard to input birth year ex. 1960

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

    can we make Calendar with 30days for every month (360 Calendar)

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

    i have an error// my datepicker was never assigned / border color

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

    Can you tell me how to make an editable date? As in standart control.

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

      It is possible, by setting the same distance between the text of the day, month and year that is displayed in the standard control.
      That way you would select the exact item in DateTimePicker.

    • @user-ky9gt2nf1y
      @user-ky9gt2nf1y Год назад +2

      Hi! Can you show, or explain exactly? Everyone here interested in this question)

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

    how to enable manual entry from the keyboard.

  • @petcharatkumsang8993
    @petcharatkumsang8993 9 месяцев назад

    Thank you , But pls help me I want to check change Time you have guide to me. thank you.

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

    I copied your code, it works fine. Image icon not showing, I don't know why it is, just assign image with link

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

    Thanks
    There is one problem, When I try to change date by keyboard, the text does not highlighted
    Can you help me?

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

      I have the same issue and can't figure out what to do. Did you find a proper solution ?

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

      @@francoismat440 No, I could not find a complete solution

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

      Up

    • @user-lz4pi6fo7q
      @user-lz4pi6fo7q 11 месяцев назад

      @@user-ky9gt2nf1y any update with this issue?

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

    please custom datagrid view win form

  • @mot-trance
    @mot-trance 2 года назад

    TOP Thank you for that description !
    I still don't understand why the hell such problems still in Visual Studio.
    I can change a property in VS-Designer but it still dosent work... Microsoft ignore that "Bugs" or what is the reason oft that ?

  • @MartinDomel
    @MartinDomel 3 года назад

    u can explain me ho u change title bar color ?

    • @adamonjourney3726
      @adamonjourney3726 3 года назад +1

      This title color is his windows standard title color. Has nothing to do here with code ;)

    • @Maik8885
      @Maik8885 3 года назад +1

      You can always make your form borderless, add a panel (Dock top) as your "new titlebar" and handle the drag of your form yourself via the MouseDown and MouseMove events.
      Code for the Drag here:
      #region Drag Form
      private Point MouseDownLocation;
      private void Drag_MouseDown(object sender, MouseEventArgs e)
      {
      if (e.Button == System.Windows.Forms.MouseButtons.Left)
      MouseDownLocation = e.Location;
      }
      private void Drag_MouseMove(object sender, MouseEventArgs e)
      {
      if (e.Button == System.Windows.Forms.MouseButtons.Left)
      this.Location = new Point(e.X + this.Left - MouseDownLocation.X, e.Y + this.Top - MouseDownLocation.Y);
      }
      #endregion

  • @dhanrajkumar8521
    @dhanrajkumar8521 3 года назад +1

    Please make a video on Combobox Design

  • @Sergi0Rubik
    @Sergi0Rubik 3 года назад

    Excelente, aun que no se puede utilizar para formato hora 😢

    • @RJCodeAdvanceEN
      @RJCodeAdvanceEN  3 года назад

      Asi es, tambien comento en el video. Pero puedes crear otro control personalizado exclusivamente para la hora (CustomTimePicker)

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

    But this is a Date picker, not DateTime picker

  • @classperfume1318
    @classperfume1318 3 года назад

    thanks for code
    but when i try to convert code to vb.net apeer error in last line in Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
    the error in this line :
    graphics.DrawImage(calendarIcon, Me.Width - calendarIcon.Width - 9, (Me.Height - calendarIcon.Height) / 2)
    tell :
    Overload resolution failed because no accessible 'DrawImage' can be called without a narrowing conversion:
    'Public Sub DrawImage(image As System.Drawing.Image, x As Integer, y As Integer)': Argument matching parameter 'y' narrows from 'Double' to 'Integer'.
    'Public Sub DrawImage(image As System.Drawing.Image, x As Single, y As Single)': Argument matching parameter 'y' narrows from 'Double' to 'Single'.
    can you tell me how fix this error
    i use vb2013
    another qustion
    can we make method to change backcolor for this datetimebicker to any color we want?

    • @RJCodeAdvanceEN
      @RJCodeAdvanceEN  3 года назад +1

      Try converting the X and Y parameters to double.
      graphics.DrawImage(calendarIcon, Me.Width - calendarIcon.Width - 9.0F, (Me.Height - calendarIcon.Height) / 2.0F)
      Regarding your other question, no need to create the method, there is already the SkinColor property to change the background color, so just use it. SkinkColor = Color.Red
      As shown in the video.