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...
Really appreciate the tutorials on custom controls, really enjoy these. Ty !
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.
Finalmente voltando a ação! Estava com saudades dos seus vídeos, principalmente o espanhol
Thanks again for this great tutorial!
Excelente material estimado, se podria modificar el estilo de los días y las flechas para recorrer los meses?
really thanks
it will be great if you can help with the Data grid view
Thank you so much
Is there any way you can change the background color of the expanded view that appears when you click the control?
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!
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!
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.
Thanks You !
But Text is overwritten how can I click on the text to edit the text as it was?
Thanks very useful your videos, really thanks.
Could you make a video for creating a 3D button?
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.
Interested with this job congrats... passible to do using VB pls share the tutorial... thx...
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.
Great tutorial. but i have a question how can i change the position of the calendar icon from right to left ?
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..
v good
Excelente tutorial
Esperamos en español
Muy pronto
What if I use only this to select time and I want the calendar icon to disappear?
Great tutorial.
Can we get Time as an input through this DateTimePicker instead of showing a calendar?
I wish.
Up
how can to enable input date manually using keyboard, its hard to input birth year ex. 1960
can we make Calendar with 30days for every month (360 Calendar)
i have an error// my datepicker was never assigned / border color
Can you tell me how to make an editable date? As in standart control.
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.
Hi! Can you show, or explain exactly? Everyone here interested in this question)
how to enable manual entry from the keyboard.
Thank you , But pls help me I want to check change Time you have guide to me. thank you.
I copied your code, it works fine. Image icon not showing, I don't know why it is, just assign image with link
Thanks
There is one problem, When I try to change date by keyboard, the text does not highlighted
Can you help me?
I have the same issue and can't figure out what to do. Did you find a proper solution ?
@@francoismat440 No, I could not find a complete solution
Up
@@user-ky9gt2nf1y any update with this issue?
please custom datagrid view win form
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 ?
u can explain me ho u change title bar color ?
This title color is his windows standard title color. Has nothing to do here with code ;)
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
Please make a video on Combobox Design
Excelente, aun que no se puede utilizar para formato hora 😢
Asi es, tambien comento en el video. Pero puedes crear otro control personalizado exclusivamente para la hora (CustomTimePicker)
But this is a Date picker, not DateTime picker
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?
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.