Create a Custom MessageBox - C#, Visual Basic (VB.NET) & WinForms / Modern Flat UI

preview_player
Показать описание
Hi, today I will show you how to create a Custom MessageBox with Windows Forms, CSharp & VB (Visual Basic .NET). Basically this custom message box does everything a standard MessageBox does, for example set the text, a title, buttons, icon, default button and returns the value selected by the user in the dialog box (DialogResult).

🔰 Download Project (C# || Visual Basic .NET)

😸Social networking

🔗 Credits
Tracks:
Last Heroes x TwoWorldsApart - Eclipse (feat. AERYN) [NCS Release]

#ModernForm #WindowsForm #ModernUI #CSharp #VisualBasic #VB.NET #VisualStudio #Custom #MessageBox #FlatUI #DialogBox
Рекомендации по теме
Комментарии
Автор

Project Download available in VB.NET and C#

RJCodeAdvanceEN
Автор

Guy your tutos about manipulating win32 controls and forms are really appreciated and so rare ! I think your channel is the best if you want to learn designing !

real_arsium
Автор

Your are so amazing RJ Code. You are my best teacher ever =)

dannaandrade
Автор

THANK YOU SO MUCH!
I made the most beautiful message box, thank you for sharing the source code in the description.
I could not have done this without you. Thanks again! :) I also subscribed

ryanh
Автор

Again you came with a great tutorial...❤❤❤

saurabhtyagi
Автор

In order to be able to customize the message box title bar, you set the form border style to none, then simple panel on the form imitates the form title bar.
That way you can easily adjust the "title bar" back color by changing the panel back color and that is clear.
But, if I am correct, I don't see that you have provided the code in order to allow user to grab the form by title bar area and move it around.
The easiest way to do it is to override the DefWndPro method.

ivicastanic
Автор

when my custom message box is on the screen and i click out the its focus area i.e i click away from message box.... the blue title bar appears on the message box with that sound.... can u plx tell me how to disable that...

natureandfun
Автор

Thanks. You are really great. Providing nice code. can you take one demo for resolution based system.

vijaykatake
Автор

What is the theme used in this Visual Studio?🤔

hlc
Автор

Привет Хауди. Сделай плз серию уроков про ООП в РНР. Кому интересно - ставим лайк чтобы увидел!!!!

CHITUS
Автор

on your combobox your github link is not working, it reloading the RJ site

paulogarcia
Автор

Please teach us on how to do a custom trackbar/slider :D

AzgarD
Автор

What Visual Studio theme are you using?

kromi
Автор

Can you teach us how to make a custom scrollbar for DataGridView, Combobox, and ListBox?

rlvy
Автор

Thanks for this idea
Can i make this custom messagebox support right to left property
I want to make this custom messagebox for arabic text and caption and buttons

mohamedgida
Автор

Focus but not working
Add Key Left or Right is ok

ngothuc
Автор

Hello, can you make wet nod32 antivirus UI?

cristiandicesarea
Автор

Great code but give me problems with windows 10 and resolution of 300% (recommended by default) so I comment the = new Size(550, 0); because is giving me messages with just the half of the space avaible and after that in the method SetIcon(... I change the way to add the image this.pictureBoxIcon.Image = Properties.Resources.error; for this one = Properties.Resources.error; for each type of message, because I need to use this line after the switch of icons = ImageLayout.Zoom; all this because of the size of the icon (is too small with 300% resolution). Hope this help someone. Cheers

RafaelZelayax
Автор

Was expecting some code that uses windows resources to construct the wpf window with msg box. But unfortunately it's just a plain old windows forms app mocking modern ui.

redcrafterlppa