How to use Winforms Modern UI Metro Framework

You may also like...

  • Pingback: How to use metroframework modern ui via NuGet()

  • Viktor Vojnic

    can you tell me where to change the messageBox backcolor? i need the orange one but only get the blue one and cant find the color .

  • Juan Carlos Cross Castle

    How can I change the icon that appears in the taskbar?

    • You can change it by changing the icon of your project.

    • And also change the icon on your form. It will not be displayed on the form but it will be displayed on the taskbar

    • bilal

      hello can you send for me the link for 3 dll files

    • Just set the icon of the form that will be the one will appear on the task bar.

    • Just change the icon on the form, that should do it.

  • Mohsen Mousavi


    Thank you for your tutorial. I have created a Winform using Metro, add Metro .dlls, but when I change the ‘Copy Local’ option for Metro .dlls to false, Visual Studio does not compile the project.

    Can you help me to solve this?

    Best regards,


    • It should copy to local, because the DLL and you exe should be in one place

    • bilal

      hey mohsen can you please send for me the link of the 3 dll files

      • Mohsen Mousavi

        Hello bilal,
        excuse me for delay.
        if you have visual studio, go to Tools > Library Package Manager > Manage NuGet Packages for Solutions… and then search ‘MetroModern UI’ in the search box. The dll are installed. Of course note that to select the package created by Denis Magno.
        Good luck

    • bilal

      hello can you send for me the link for 3 dll file

  • Steven Kayden

    How do I change the color of the design? The default is green. And if I for example want red?

    • There is a style property, or you can add a stylemanager

    • bilal

      hello can you send for me the link for 3 dll filess?

  • Zuher Laith

    Hello ,, Great Tutorial ,, But the last step (Coding in Form1) ,, Can we do it on VB.NET?
    & What its the Code for VB.NET ? Please Help ..

  • Mihai

    How to use metoTabControls in WinForms C#. Doesn’t work in the same way as TabControl works.

  • yenita

    thankyou for sharing this tutorial.
    i have downloaded the package that include MetroFramework Fonts.dlls etc. but when i open it, the file type doesn’t ‘dll’, the file type has changed into csproj.
    so what will i should do ? please help me. thankyou 🙂

    • bilal

      hello can you send for me the link for 3 dll files.?

      • Please see my comment above on how to get the DLL

    • Mohsen Mousavi

      Hello yenita,
      I think you’ve downloaded the package from github, but it does not matter.
      if you have visual studio, go to Tools > Library Package Manager > Manage NuGet Packages for Solutions… and then search ‘MetroModern UI’ in the search box. The dll are installed. Of course note that to select the package created by Denis Magno.
      Best regards,

    • It is much better to get the DLL via NuGet or compile the source code to obtain the DLL, this will ensure that it is virus free.

  • bilal

    where i can find the 3 dll file anyone help pleassse

    • You can get it from NuGet or just download the source code and compile, this it to make sure that it is virus free.

  • mohdahmed108

    “Cannot add ‘MetroTextBox’ to TabControl. Only TabPages can be directly added to TabControls”. How to solve this problem?

    • You can only add MetroTextBox on TabPages not on TabControl

  • Hamza Achadini

    Hi Dennis, Please I have this Problem With My form , I can’t Change The color of the head , and i can’t also change The backcolor Of the Form with the tile , Like Pictures .

    • Mohsen Mousavi

      Hello Hamza,

      I can swicth the the theme and style, but theme is not extended to the whole of the form, see picture.

      Use ‘using MetroFramework;’ and metroStyleManager and metroStyleExtender to change the back color of the form and its style.

      And another problem: some events are not working.

      • if you will use the stylemanager put this code after InitializeComponent()

        this.StyleManager = this.msmMain; msmMain is the name of stylemanager

        • foureyespotatoKIM

          how to change the backcolor of the controls like metro textbox. i tried to change it by the properties but no good

          • There is property on every MetroControl UseCustomBackColor just set it to True

  • Draxtor

    how can I use style extender to set theme to standard controls. It seems that it does not work. I’m using VS 2012, framework is working. I’ve added manager and extender to the form and added some text boxes and buttons (standard ones). I’ve set ApplyMetro Theme… to true but it does not work. Only button gets white background, text box stays the same.

    • Why not just use the MetroTextbox and MetroButton?

  • Anderson Santos

    How can I use a Metroform in ShowDialog without it disappears when I minimize the application ?

  • Not sure if this is in the prior comments, but there is an issue when using VS2015 RC (I know it is not a released product), but when I drop a MetroModernTextbox control on the form it seems to work fine at first. Once I close the form and reopen, the VS2015 designer says there is an error in the forms designer.cs file for the textbox control but the code looks fine. Not sure if the problem is with the controls or VS2015, but the VS2015 Textbox control works fine, it is just ugly on the page with the other Metro controls.

    Otherwise, the controls work great.

    • I haven’t got a chance to use VS2015. But I guess it should work fine, what is the .net framework you are using?

      • OK, been playing with this for about an hour this morning and I think I found the problem with the code. After I drop a control onto the page, I have set the following properties:

        Enabled = false
        ReadOnly = true
        Multiline = true
        Text = {blank}
        PasswordChar = {blank}
        Size = new System.Drawing.Size(237, 240);

        Then close the form. When I go to open the form, the designer throws the above error but it is showing the wrong line number (Microsoft’s problem, which is what threw me off) but when looking at the code, the problem is in the generated on the PasswordChar property in that the value is set to ” which is an invalid value (char’s can onl be one character in length). If I simply set this to ‘0’ in the designer the code works fine and since it is not a password box it doesn’t show anything.

        I then built a completely new version of the same sample code in VS2013 Update 4 and the code DID NOT throw the same error. The PasswordChar field is set to ” in the code behind so the designer doesn’t care in VS2013 This is obviously a difference in how the designer works between VS2015 and VS2013 and should be a point of interest for when VS2015 is released to see if they picked up on the problem. I am going to submit a bug to Microsoft and see what they say.


  • Eikzleor Delos Reyes

    I would like to say thanks for this open source control it is really awesome ^_^

    Hope there is a MetroTreeView control added in the package.

    Big thanks!

    • I already designed it but don’t have time to complete it. Don’t forget to subscribe so that when I upload it you will get notified. Cheers!

  • Ali Hameed Al-Hashmi

    the last version 1.3 are there newest another version ???

  • Thor

    How exactly do I make the messagebox appear? Some pople says it’s a control in the toolbox etc which I doubt. Thanks.

    • You can try to use this code MetroFramework.MetroMessageBox.Show(this, “This is a sample messagebox”, “Session”, MessageBoxButtons.OK, MessageBoxIcon.Information);

      • Thor

        Before the “This is a sample messagebox”, you put “this, “. What is that?
        By the way I am using, not c#

        • The this represents the form from where you are going to display the messagebox. In your case you should be using “me” for VB

          • Thor

            Thank you! 🙂

          • You’re welcome Thor… Regards to The Avengers : )

      • Dan Golding

        Hi Dennis, when I do this the title text gets cut off at the bottom. Do you know how I can correct this? Here is an image showing this behaviour:

      • Dan Golding

        And just to add to my below post, that cut off only happens on my Windows 7 (dev) PC. The production PCs run Windows 8 and all the heights and spacing go awry. The title in the message boxes gets fixed (no longer cutoff) but I have datetimepickers aligned with button (height’s set to be identical) that look right on my windows 7 PC but on the windows 8 PCs the heights changes and suddenly the buttons are shorter thanthe datetimepicker and other controls overlap etc… Any idea what causes this and how to correct for it?

  • Андрей Непеин

    Hello! How i can change “TileImage” property in code? i tried, but…

    private void UploadImage_Click(object sender, EventArgs e)
    OpenFileDialog ofd = new OpenFileDialog();
    ofd.Filter = “PNG; JPG; JPEG; GIF; TIFF|*.png; *.jpg; *.jpeg; *.gif; *.tiff|PNG|*.png|JPG|*.jpg|JPEG|*.jpeg|GIF|*.gif|TIFF|*.tiff”;
    if (ofd.ShowDialog() == DialogResult.OK)
    UploadedFile = ofd.SafeFileName;
    UploadImage.Text = UploadedFile;

    • You can use this code
      mtlTile.TileImage = Image.FromFile(UploadedFile);

      • Андрей Непеин

        Thanks, i’ll try:)

  • Sunny Khan

    I just imported the NuGet package into visual studio 2013. I found that all the metro control in toolbox cannot be added on the windows form, and they will display on the panel under the windows form. How can i solve this?

    • Did you add the 3 DLL’s on your reference?

      • Adriana Escamilla Alvarado

        I have the same problem, I opened the project ( in VS 2015 and also 2013 and both gave me lot of problems, I tried to build it to get the 3 DLL’s…

        I installed the Package NuGet in VS2010 following the instruction on this screen (, also Choose Controls in Tool Box adding some dlls installed into package folder of my Solution.

        I tried to add the MetroButton and I couldn’t see it in the panel/form/userControl , I convert the Form and User Control to MetroForm and MetroUserControl and the MetroButton is still appears in panel under the form. (Also I tried do this in VS 2010 – 2013 and 2015 and still the problem)

        I tried to convert manually a Common Button to MetroButton, I can see it in the Form/UserControl but didn’t recognize the double click when I tried to add events and it was disable when I ran the Form.

        Do you have an url where I can download those 3 DLL’s ??? Or how I can solve this problem??? Really I loved your project and I would like it to use all components and I feel so frustrated =(

      • Adriana Escamilla Alvarado

        Never Mind… I just found the problem… is the Framework Version, I tried with 4.0 and it works with 4.5 .


    • you can add a new tab in your toolbox item and add metroframework item in this

    • Adriana Escamilla Alvarado

      Did you solve it? I have the same problem =(

    • Adriana Escamilla Alvarado

      Never Mind… I just found the problem… is the Framework Version, I tried with 4.0 and it works with 4.5

  • Isabella

    I’m having a problem when I open my form, it aparecere on the taskbar, but only for a second, then disappears from the taskbar, and need to return to the main form using alt + tab.

    And every time I use metromessagebox in a secondary form, the same thing happens with all open forms.

    • Did you set your windowstate to maximize? I guess you did it this way. Quick fix for this is to set windowstate to normal and inside your on Form_Load set the windowstate to maximize. Hope this helps.

  • Osama Malik

    Thanks 4 great tutorial…actualy i m newbie in vs…. i have a issue…when i start project it gives me this error …Object reference not set to an instance of an object…..i follow same steps as shown in tutorial….i just make a simple form ….

    • Do you have the form name Form1?

    • Erik Figueiredo

      I got the same issue. Have you fixed it?

      • Have you added the 3 DLL’s as a reference on your project?

        • Erik Figueiredo

          Yeah, there are 3 dlls. I can see the UI renderized. Actualluy mine was another error: An unhandled exception of type ‘System.ObjectDisposedException’ occurred in System.Windows.Forms.dll. It happens in the same place as the image above (void Main), but it seems because I verify if the program is running as Admin:

          adminMode = UtilityFunctions.runAsAdministrator(Application.ExecutablePath);
          if (!adminMode) return;

          Any idea how to solve it?

          • UtilityFunctions is it from a different tools or your custom class? Whats inside this UtilityFunctions.runAsAdministrator?

          • Erik Figueiredo

            UtilityFunction I got from another SDK project. Inside has this:

            public static bool runAsAdministrator(String path){

            WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
            bool hasAdministrativeRight = principal.IsInRole(WindowsBuiltInRole.Administrator);

            if (!hasAdministrativeRight){

            ProcessStartInfo processInfo = new ProcessStartInfo();
            processInfo.Verb = “runas”;
            processInfo.FileName = path;

            return false;
            }catch (Win32Exception){
            //Do nothing. The user most likely cancelled the UAC window
            return false;

            return true;

          • Erik Figueiredo

            The error happens at this line: Process.Start(processInfo);

          • If you just want to force your application to run as administrator instead of using another SDK use this approach :

            Right click on your project->Add New Item, select “Application Manifest File”, open that file and look for this line of code

            and replace it with

            The user will get the UAC prompt when they start the program.

          • Erik Figueiredo

            Wonderful solution! Works fine now! Thanks a million!

      • negeric

        I get the same issue as well, however, this only happens after I build the project. Debugging works without error

    • John

      How did you get past this error? I have this error to with just a simple form.

  • Rajeev

    Brilliant effort and thanks for sharing it. any chance of a treeview?

    • Soon my friend, just make sure to subscribe. So that when I release it you will get notified : )

  • Pingback: MetroFramework Modern UI Project - DenRic Denise()

  • Sarath KCM

    The Screenshots and the Video looks amazing, Thumbs up for the efforts. Only problem is that I cannot get the Demo project running. I Downloaded the source from gitHub, extracted it and Hit F5 in visual Studio (VS 2010 Ultimate, and VS 2013 CE), below image was the result. In case image is not visible, the Error is in MetroForm.cs file, line:590,

    windowButtonList.TryGetValue(WindowButtons.Maximize, out btn);

    The error is that windowButtonList is null. I tried initiating this variable with an empty dictionary (I know, but I have my stupid methods) and I got another error on the next line(591)

    if (WindowState == FormWindowState.Normal) shadowForm.Visible = true;btn.Text = “1”;

    Here shadowForm was null.

    I really want to see it in action once at least.

    • I tried to download my fork in GitHub, open it in Visual Studion 2013 and its working fine. Did you get this fork

      • Sarath KCM

        Hi, thanks for replying. I downloaded the code from viperneo’s(Sven Walter) GitHub. Thanks for pointing to the new version. This one works perfectly. Thanks again for such a wonderful project… 🙂

  • marlon68ve

    Hello, how can I launch another form? Form2.Show() does not work.

    • Should be lie this.
      Dim _form2 as Form2

  • Ben

    Hey I have a Problem after adding some textboxes and combotextboxes to my form

    • This is version 1.3.0? What .net framework?

      • Ben

        Version 1.3.0 and .net Framework 4.5.2

        • Try to change it in lower .net framework

          • Ben

            What do mean? It is a fresh copy of visual studio 2015 with .net framework 4.5.2

          • Right click on your project then properties then application. Check the Target Framework change it to 4.5 or lower

          • Ben

            Did not helped

          • Ben

            I tested it with 4.5 and 4. Still gives me an error after some time. Really annoying

          • I tried on my VS2015 and there is no problem at all. Is this the version that you are using

          • Ben


          • Ben

            I made a video to show you the exact error and to proof that it is a bug on all system:

          • If you encounter that kind of issue just clean your project and rebuild

          • Ben

            What do you mean by cleaning and rebuilding?

          • Right click on your project then select clean. Right click again then click rebuild.

          • Ben

            I did. Issue is still there

    • Osamah Taher

      Did you fixed the problem I have same problem??

  • সুখের রাজকুমার

    how to use metro tabpage

    • You can only use MetroTabPage together with MetroTabControl

  • BertLin

    Thank for you ^^!

  • salla uday

    while iam setting form1.MaximizeBox having error
    Object Reference Is not set to an instance of object
    Please Resolve this

    • Fixed. Check it out on my GitHub

      • salla uday



    sir How to use Winforms Modern UI Metro Framework

    in project ? i don’t know how to change c# to vb

    • You can use it in VB. Check out my other blog post on how to use it in VB.Net

  • Augustine Williams Bruce

    I just update to version 1.3.5 andnI have have 2 issues1. An error “only top level controls can have an owner” when I set mdi parent for a child form, I never got this on the older version.
    2. Has PromptText property been removed from MetroTextBox control in this release.

    • This is already resolved and fix is already available in GitHub

      • Augustine Williams Bruce

        Yes all is well after the fix. Thanks.

  • Osamah Taher

    I have problem after I worked with Mtero UI modern components suddenly got error to display form design. Please help me

  • Osamah Taher

    Please Help. After work for long time in my project using Metro UI modern components suddenly faced this problem I cant open from designer. Its giving error like below. Sometime this error coming

    • Osamah Taher

      Did you fixed the problem. I have same problem

    • What is the particular error on line 546?

      • Osamah Taher

        Nothing only its say remove me.metro……etc. “Me” its the winform which is holding the metro items (form1) for example. Also I removed it but nothing changed. its giving same error for all line which are contains on metro items.

        • Try to clean then rebuild your project.

          • Osamah Taher

            I tried all your advices in the comments nothing changed.

          • Double check if all 3 MetroFramework DLL’s have the same version on your reference.

    • Jeff A R

      Hello, the error is caused by this line in the designer-generated code, for forms having metro box (VB.Net):

      Me.MetroTextBox1.Lines = New String(-1) {},

      Removing this line from the designer-generated code would temporarily fix the error, but will return once you add another control or do some editing in your forms having metro textboxes.

      I just downloaded Dennis Magno’s GitHub repo and removed these lines from the MetroTextBox.cs file in the MetroFramework solution:

      //TODO: Add back these lines when a fix is done
      //Might be incompatible with VB.Net

      //public string[] Lines


      // get { return baseTextBox.Lines; }

      // set { baseTextBox.Lines = value; }


      and then recompile.
      I have not encountered the same error in other controls, and not yet tested if this error will appear using c#.
      I am using VS2015 Community Edition in Windows 10.

      • I think you are using .net framework 4.5 up? Try to change it to lower .net framework

  • Muhammad Taha

    i am unable to change font of metroTextbox !

    • There is property called FontSize from where you can choose from Small, Medium, Tall. This is the approach to all the controls to have a unified look.

      • Muhammad Taha

        sir i am asking about fontfamily not fontsize ? textbox is on Arial By Default and i want to change it to Segoe UI Light

        • You can change it by using the FontWeight property. Font family is default to Segoe UI, you can choose FontWeight from Light, Regular and Bold

  • scouser92

    Help, please.
    Why is not name of the first tab displayed??
    MetroTabControl Alignment:Left(Right) Bug??

    • I think its the bug. Cause by default tab is used on top.

  • Muhammad Taha

    thanks for the your kind support sir i got a little problem when i just open an child form with the reference of metroStyleManager it just applied on form, and the control remain same as default ?

  • Azeem Ullah

    In metroTile there is no option for tile image layout (such as zoom etc). Is there another way of fitting an image properly in metroTile? If not can you please suggest me a toolkit for tiles?

  • Alan Medina

    This framework supports live tiles?

  • CodingSource

    Hello sir.. I am impressed with the theme but I have one concern. I can’t use the TabControl and it urged me to download a TabControl control. I watched your videos but you just used the TabControl perfectly. I am using the MetroModernUI 1.3.0..

    There is a messagebox, whenever I drag and drop controls into the TabPage, that says that only tabpages could be added in this control. Please see the picture :'(

    I have added the three dll’s and I don’t know what causes this problem 😛

  • Buddy

    I only show 11 items in the toolbox? Where are all the rest of the tools? What am I doing wrong, trying to install with Visual Studio 2015

  • Buddy

    here is my toolbox list after I load the dll

    • What version are you using? It should be 1.3.5 check out the download section of this site.

      • Buddy

        Thank you for the quick response, I tried 1.3.5 and then I thought there might be something wrong with the version and I tried 1.3.0 but got the same result, also tried downloading the version directly and not using the package installer. I select the .dll to load the tools and only get a few items.

        • What .net framework are you using? Try not to use 4.5

          • Buddy

            I am using 4.6.00079 with VS 2015

          • Buddy

            I tried going back to 4.0 and this didn’t change anything

  • negeric

    I get the following error when I run my application. This error only occurs after I build the solution and run the executable, and does not occur when I am debugging in VS. I am using VS 2015 with Target Framework of 4.5.2 and Metro DLL 1.3. I have ensured that all 3 DLLs are included

    System.NullReferenceException: Object reference not set to an instance of an object.

    at MetroFramework.Forms.MetroForm.WndProc(Message& m)

    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Again, this only happens after I build the solution. I can debug just fine without error.

    • Chai Xiong

      I encountered the same issue. Appreciate your inputs.

  • Toma

    Hi Dennis, I actually dropped you an email, not sure if you received it, I’m having an issue with form Focus, and needing to double click (once to gain focus of the form, and second to fire the button click event on the form).. I’m not sure if this is a noted Bug, or I am maybe missing an important part of setting up the MetroForm? thanks in advance 🙂

    • Toma

      actually I’ve solved my own issue.. it is a focus issue, that the standard click-through in winforms usually handles by focusing whatever the mouse is over.. since it is a custom control, it does not implement this I think.? might be worth adding it into the metroForm

      I added an event to all my forms now, and is behaving as normal winforms do.

      private void MainForm_MouseEnter(object sender, EventArgs e)

      • Toma

        Reverted away from using MetroForm…. still using the Metro Custom Controls, but the form focus issues were killing usability… 🙂 hopefully you can fix it soon

        • Almar Sigurðsson

          Hi @disqus_88Ckrrf67G:disqus
          I know it is a long time ago but I´m now having the same problem…
          But I found a solution to the problem and is working every time and not killing the usability.
          I used your solution but modified it a bit…

          private int focusFlag = 0;

          private void MainForm_MouseEnter(object sender, EventArgs e)
          if (focusFlag < 1)

          This will not always try to focus on that form when trying to go to other forms or something else, it will just focus once and that is enough… after that it will behave normally 🙂

          Hopefully this will help someone 😛

  • CV Team

    Anyone found a problem with metro grid not able to return the formattedvalue of a cell ?
    The grid displays a formatted cell value no problem, but using code I have found no way to retrieve that value! For example both variables return the same value below:

    val1 = metroGridExportAllocationJournalEntries.Rows[5].Cells[1].Value.ToString();
    val2 = metroGridExportAllocationJournalEntries.Rows[5].Cells[1].FormattedValue.ToString();

  • Laurence Salvador

    Thanks for fast reply sir Denise, What about scrollbars, I have new form and set it to autoscroll, so that form can be scroll, vertically or horizontally, but the scroll bar, isnt metro UI, i added metroscroll bar, but i don’t know how will it function in form windows.

  • Dario Ferreira Franca

    You interressa in translating the of code to C # this form? contact

  • TanodeOro

    I have the same problem that Buddy, I only see 11 items in the toolbar. ?

    What is the problem ?

  • Bledi

    Hi Denric, thnx for all you do,
    i want to ask how can i do AutocompleteMode for MetroTextbox,

  • Fatih Kubaşık

    Hi. Thanks 4 great tutorial. I make a program but metro form doesn’t appear on taskbar. Anyone can help me?

    • Set the WindowState to Normal, and in form show set it to maximize

      • Fatih Kubaşık

        thanks for your quik reply. But It is the same

        • Set the WindowState to Normal and try to add this under form load.
          this.FormBorderStyle = FormBorderStyle.None;
          this.WindowState = FormWindowState.Maximized;

          • Fatih Kubaşık

            hi I solve it. I m changing showInTaskbar=false/true. (toggle) under the form load, I added 2 lines and its work fine.




  • Shiv

    Hi.. I Hav Tried your metro-ui dlls to create my winform apps..can i have a detailed tutoril explaining all the controls used in it..

    • Please check my other blog post. I already have some tutorials on how to use other controls.

  • Iain Hodgen

    Hi, I am using the framework but am getting an error on all MetroTextBoxes using VS2015 (no problem in VS2013) all text boxes in the program are getting reset on the lines property to the following:

    Me.HouseNumberTextBox.Lines = New String(-1) {} (see pic)

    if you change to Me.HouseNumberTextBox.Lines = New String() {“HouseNumberTextBox”} (as when the control is added to the form) the error is fixed.

    When you close and open the forms this is reset by the designer to Me.HouseNumberTextBox.Lines = New String(-1) {} and causes an error and the form cannot be opened until they are corrected.

    Does anyone have a solution for this?


  • Iain Hodgen

    When the control is added it by default adds the control name as text, when you remove this text this is when the error is created

  • Iain Hodgen

    On inspecting the DLL there seems to be no default values for the lines property so when you remove the text from the new control it wants a value in the lines property as it cant handle an empty array – could be wrong?
    It does mean though that the MetroTextBox is unusable in VS 2015 as it stands

    • I will double check that and update is necessary. Thanks for the find.

      • Iain Hodgen

        The problem only seems to limited to VS2015 works fine in VS 2013, Cheers.

  • Ed Shee

    hi denric, i can’t use metro message box? how can i use this in my project? tnx in advance for reply

    • You can use it like this MetroFramework.MetroMessageBox.Show(this, “Invalid User Name and / or Password!”, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);

      Please check my other post on how to use MetroMessageBox

  • Ramon

    I would love to use this awesome Theme but it gives me Designer errors wich I can’t fix. Please look over you’re code and fix it.

  • tishan

    Hi Dennis, I created a windows app using your framework for one of my assignment. It works fine, but when i try to open my project in another machine some of from layouts get changes. At the same time text box control bottom border line not get rendered. Can you think of a reason why this is happening ?

  • coastaldata

    Hello, I’m looking to style the form, so that the logo shows in the upper left hand corner instead of the title text. Does anyone have a quick answer for how to do that? Thanks!

  • Bhavesh Patel

    Please help me how to solve this error…
    during page open..

  • Adi Puteri

    Hello Dennis, is it possible to use the ModernUI with a Listbox (not Listview!) or are you planing to add it for the Listbox? Greets, Adi Puteri <3

  • LP Lâm

    I want bold one characters in a string. or set color for one characters in string
    – MetroLabel
    – MetroTabPage (Text)

    – And add icon on Form Header.
    What should I do ?

  • Fry

    Hi Dennis, how can we use the Framework with Listbox controls? I can’t see any possiblities for the Listbox control.

    • MetroListView is almost done. I will try to develop MetroListbox it should be not that much difference.

  • Lucas Mourão Lopes

    Perfect, thanks!

  • DenzJheng

    Hello kabayan Dennis,
    I am using version1.3.5. and successfully add 3 dll in projects reference as well as in the toolbox, however, I encountered error when attempting to use MetroTabControl in my form. Below is the screenshot of the error. Appreciate your feedback. Thanks

    • Where is the screenshot?

      • DenzJheng

        I was about to upload the screenshot, unfortunately the upload image button disappear in editing mode. Anyway, I already sorted it out by resetting the toolbox and then re-adding it again.

        My question now is, when do you plan to release the Metro Listview and Metro Group?

        Thanks kabayan.

  • ma not able to drag and drop the tools, while dropiing it dropped below the design window.

  • Joshua Oladayo

    Please the error am getting is unable to load library when am trying to add tools to toolbox

  • Vipin Vijayan

    I have used the metro framework controls in my form .My issue is when gone to another form and came back t the same page ,written code to focus my grid on form activated event.But its not focusing the gridview(Not gridview the form itself not focused) I need to mouse clikc on the for to get the grid focused.How can i solve this issue ?

  • Awesh

    Hello Sir,
    When i made a MDIContainer metro form , and tried opening another metro form in it, i am getting this Exception each time i run my application, “only top-level controls can have an owner”. Could you please assist me with the solution. (Sorry for my bad English).

    • Awesh


      • Veronica Baumgardner Van Dyke

        Awesh – Download the source code and change the MetroForm.cs file. Go to MetroShadowBase, and wrap the line of code

        TargetForm.Owner = this;

        in a try/catch block. it will then skip over this line and should work. In theory, if you do not have a shadow set on your forms, it shouldn’t even hit this line, but I removed shadows from both of mine, and it still kept throwing the errors.

        Note: This is CLEARLY a hack, but it solved the problem.

        • Awesh

          Thank You Veronica Baumgardner Van Dyke 🙂

          • Gl Saikumar

            Did this solve the issue ? Because I am going to try now.

          • Awesh

            Honestly i haven’t test that solution, instead i am now using another library to design my winform apps.

  • mohamed azarudeen

    in this framwork some event not working like when we press enter button event not work and in textbox control there is undo() function missing

  • mohamed azarudeen

    its not match to base controls

  • Ben Cook

    I am trying to create a basic set of Metro Tile’s with different back colors. I have changed the BackColor field under Properties but they stay blue. Am I doing something wrong? Thanks

  • muhammad jana

    how to change background color for

    • Background color of form? You need to change the theme.

  • Amm2100

    How to use it in VB.NET ? that code is in C# right ? can you give me it in VB.NET ?

    • Please check out my other blog post, I have it in VB.Net

  • muhammad jana

    how tu use MetroProgressSpinner on 2010?

  • Pablo L

    I have a glitch shadow in the metro tab panels, the glitch disappears when the user click on it. I’m using Windows 10, any ideas to fix it?


  • Markus Tüp

    Hello Dennis,

    is it possible to change the button localization in MetroMessageBox ? Like the MetroToggle.xml Solution ?

    • Yes it is possible, already find a way to to do this. Will be included on the next release.

      • Markus Tüp

        Hi. That’s amazing. Can you say when the next Release will come ?

  • Fajr

    how to change the Toggle on/off text?

  • Jumper

    Hi, I just came across your Metro Framework and I think it’s great. But I would like to ask about something. I can’t get the form to look like other people’s. I either have a Standard From or NO frame. I don’t get the “tiny” blue line with the form name oversized.

    Any ideas?

    edit: I know it’s not a lot of information, but that’s the best way I can explain it without sending screen shots or code.

    • Gl Saikumar

      Once you have DLL’s, you are ready for a new project. and in that project,

      1. you shud add the Metroframework components in the toolbox.
      2. Add references.
      3. Change the form style in the class file of the form from ‘Form’ to ‘MetroForm’ and then add ‘using metroframework.forms’ at the beginning.

  • Jumper

    Hello, I have some questions. When I try to use the dark theme, the control box becomes visible and shows all three items. I don’t know if the problem is because of me doing something wrong, or the software.
    Also, I wish there were some colors in between white and black. I think totally black is a bit much and it would be nice to use dark grey for example.

    thanks a bunch.

  • Jumper

    Ok, I give. Is there anywhere that I can ask questions or get support for this software?

    • I am trying my best to answer most of the questions in spite of my busy schedule

  • Craxy Virux

    Hello Sir,
    Just want to know how to change Metroform backColor? I found out that the default back color is set to read only.. Thank you Sir and More Power..

    • You can only change it through code. Download the latest source code from GitHub.

  • thanks i really like it a lot

  • James

    How to count characters in a textbox using MetroUI textbox? I don’t have any problem with the default textbox of visual studio using that command. How to fix this?

    • use the KeyPress event

      • James

        Thank you for your immediate response, but I don’t know how to do it. Do you sample codes?

    • TextLenght is currently not available but can be added. For the mean time you can do txtText.Text.Length

      • James

        I’ve already tried, but it seems it doesn’t work.

  • Venmar

    How can I fix this? Please help me. Because of this problem I can’t add any button, textbox, label etc. Inshort i cant put anything in the form.

    • What .net framework are you using? Did you include 3 DLL’s on your project?

    • MAMohd

      This error happens when your MetroFramework DLL is older than the recent. Add the toolbox again by right clicking the toolbox and clicking Choose Items > MetroFramework.dll

  • Thor

    Why does the buttons remain ‘pressed’ after I press them? Thanks

    • It is not pressed it is just showing that it is currently got the focus.

  • Jegatheeswaran

    how to show child form in MdiParent

  • Wiedy TP
    • John Torres

      I’ve the same problem when showdialog.

      • Try to show your 2nd form like this
        ChildForm _child = new ChildForm();

        • John Torres

          oh Thanks, works fine.
          In vb:
          Dim _child as Form2 = new Form2

          • Yes correct, that’s how you do it in VB.Net. Glad that it is working now.

    • Ho do you show your form? It should be
      ChildForm _child = new ChildForm();

  • Venmar

    Hello sir, how can I center the text in the column header?

  • Howie

    I am trying to merge the source into my own project to make an exe alone and I started by merging three dlls into one, but I found once I merge the source from MetroFramework.Design to MetroFramework, some controls become problematic like Buttons and LinkLabels appear at the bottom like Timers or BackgroundWorkers do instead of appearing in the form directly. Is it possible to merge all three projects into my exe? Thanks in advance.

  • Prakash

    Hi all,
    I changed the inheritance of the form class from Windows.Forms to MetroFramework.Forms.MetroForm
    UI changed, but its not resizing. i have checked its properties [resizable:true]

    what could be the issue?


  • Pingback: How to use Winforms Modern UI Metro Framework | Coding Tutes()

  • tiago pereira

    have a warning: the prompttext is obsolete. please use watermark. i’ve used watermar and this warning show

  • tiago pereira

    how to modify size height of combobox?

    • You can change it under properties.

      • Mozart Ryan

        weird, i cant change it (the height size)

  • Pieter

    When I open a child window, and close it again, I need to double click to get my next action done (for instance a button click or menu), instead of a single click.
    Using windows7 and metro1.4
    Please help.
    gr. Pieter

  • FoghornLeghornTheThird

    There appears to be a bug with the default button, ie pressing [enter] for either of these two scenarios results in a ‘yes’ being returned:

    MetroFramework.MetroMessageBox.Show(owner, “delete”, Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)

    MetroFramework.MetroMessageBox.Show(owner, “delete”, Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)

    Also, the first button in both scenarios is grey.

  • andy last

    Hello sir,
    how i get “using Transitions;” ?

    • ghz14

      right click on your project and click on “Manage NuGet packages”

      search for “Transitions”
      install “dot-net-transitions”

  • andy last
  • Juan Sowden

    I have been having a lot of trouble getting my form controls to work, every time I add a few controls I keep receiving a designer error.

    I have pasted the designer code at the bottom as zip files cannot be attached.

    The error stack:
    > Instances of this error (1)
    > 1. Hyperion frm_CompanyInformation.Designer.vb Line:67 Column:1 Hide Call Stack
    > at Microsoft.VisualStudio.Design.Serialization.CodeDom.XML.CodeDomXmlProcessor.ParseXml(String xmlStream, CodeStatementCollection statementCollection, String fileName, String methodName)
    > at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnMethodPopulateStatements(Object sender, EventArgs e)
    > at System.CodeDom.CodeMemberMethod.get_Statements()
    > at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
    > at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
    > at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
    > at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)

    Designer code:
    Partial Class frm_CompanyInformation
    Inherits MetroFramework.Forms.MetroForm

    ‘Form overrides dispose to clean up the component list.

    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
    If disposing AndAlso components IsNot Nothing Then
    End If
    End Try
    End Sub

    ‘Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    ‘NOTE: The following procedure is required by the Windows Form Designer
    ‘It can be modified using the Windows Form Designer.
    ‘Do not modify it using the code editor.

    Private Sub InitializeComponent()
    Me.lbl_CompanyName = New MetroFramework.Controls.MetroLabel()
    Me.txt_CompanyName = New MetroFramework.Controls.MetroTextBox()
    Me.txt_PhysicalAddress = New MetroFramework.Controls.MetroTextBox()
    Me.lbl_PhysicalAddress = New MetroFramework.Controls.MetroLabel()
    Me.txt_BillingAddress = New MetroFramework.Controls.MetroTextBox()
    Me.lbl_BillingAddress = New MetroFramework.Controls.MetroLabel()
    Me.txt_PhoneNumber = New MetroFramework.Controls.MetroTextBox()
    Me.lbl_PhoneNumber = New MetroFramework.Controls.MetroLabel()
    Me.txt_FaxNumber = New MetroFramework.Controls.MetroTextBox()
    Me.lbl_FaxNumber = New MetroFramework.Controls.MetroLabel()
    Me.txt_Email = New MetroFramework.Controls.MetroTextBox()
    Me.lbl_Email = New MetroFramework.Controls.MetroLabel()
    Me.txt_Serial = New MetroFramework.Controls.MetroTextBox()
    Me.lbl_Serial = New MetroFramework.Controls.MetroLabel()
    Me.MetroButton1 = New MetroFramework.Controls.MetroButton()
    Me.MetroButton2 = New MetroFramework.Controls.MetroButton()


    Me.lbl_CompanyName.AutoSize = True
    Me.lbl_CompanyName.FontSize = MetroFramework.MetroLabelSize.Tall
    Me.lbl_CompanyName.Location = New System.Drawing.Point(23, 60)
    Me.lbl_CompanyName.Name = “lbl_CompanyName”
    Me.lbl_CompanyName.Size = New System.Drawing.Size(136, 25)
    Me.lbl_CompanyName.TabIndex = 0
    Me.lbl_CompanyName.Text = “Company Name”


    Me.txt_CompanyName.CustomButton.Image = Nothing
    Me.txt_CompanyName.CustomButton.Location = New System.Drawing.Point(498, 1)
    Me.txt_CompanyName.CustomButton.Name = “”
    Me.txt_CompanyName.CustomButton.Size = New System.Drawing.Size(21, 21)
    Me.txt_CompanyName.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
    Me.txt_CompanyName.CustomButton.TabIndex = 1
    Me.txt_CompanyName.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
    Me.txt_CompanyName.CustomButton.UseSelectable = True
    Me.txt_CompanyName.CustomButton.Visible = False
    Me.txt_CompanyName.FontSize = MetroFramework.MetroTextBoxSize.Medium
    Me.txt_CompanyName.Lines = New String(-1) {}
    Me.txt_CompanyName.Location = New System.Drawing.Point(23, 88)
    Me.txt_CompanyName.MaxLength = 32767
    Me.txt_CompanyName.Name = “txt_CompanyName”
    Me.txt_CompanyName.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
    Me.txt_CompanyName.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txt_CompanyName.SelectedText = “”
    Me.txt_CompanyName.SelectionLength = 0
    Me.txt_CompanyName.SelectionStart = 0
    Me.txt_CompanyName.ShortcutsEnabled = True
    Me.txt_CompanyName.Size = New System.Drawing.Size(520, 23)
    Me.txt_CompanyName.TabIndex = 1
    Me.txt_CompanyName.UseSelectable = True
    Me.txt_CompanyName.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
    Me.txt_CompanyName.WaterMarkFont = New System.Drawing.Font(“Segoe UI”, 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)


    Me.txt_PhysicalAddress.CustomButton.Image = Nothing
    Me.txt_PhysicalAddress.CustomButton.Location = New System.Drawing.Point(117, 2)
    Me.txt_PhysicalAddress.CustomButton.Name = “”
    Me.txt_PhysicalAddress.CustomButton.Size = New System.Drawing.Size(137, 137)
    Me.txt_PhysicalAddress.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
    Me.txt_PhysicalAddress.CustomButton.TabIndex = 1
    Me.txt_PhysicalAddress.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
    Me.txt_PhysicalAddress.CustomButton.UseSelectable = True
    Me.txt_PhysicalAddress.CustomButton.Visible = False
    Me.txt_PhysicalAddress.FontSize = MetroFramework.MetroTextBoxSize.Medium
    Me.txt_PhysicalAddress.Lines = New String(-1) {}
    Me.txt_PhysicalAddress.Location = New System.Drawing.Point(23, 142)
    Me.txt_PhysicalAddress.MaxLength = 32767
    Me.txt_PhysicalAddress.Multiline = True
    Me.txt_PhysicalAddress.Name = “txt_PhysicalAddress”
    Me.txt_PhysicalAddress.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
    Me.txt_PhysicalAddress.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txt_PhysicalAddress.SelectedText = “”
    Me.txt_PhysicalAddress.SelectionLength = 0
    Me.txt_PhysicalAddress.SelectionStart = 0
    Me.txt_PhysicalAddress.ShortcutsEnabled = True
    Me.txt_PhysicalAddress.Size = New System.Drawing.Size(257, 142)
    Me.txt_PhysicalAddress.TabIndex = 3
    Me.txt_PhysicalAddress.UseSelectable = True
    Me.txt_PhysicalAddress.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
    Me.txt_PhysicalAddress.WaterMarkFont = New System.Drawing.Font(“Segoe UI”, 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)


    Me.lbl_PhysicalAddress.AutoSize = True
    Me.lbl_PhysicalAddress.FontSize = MetroFramework.MetroLabelSize.Tall
    Me.lbl_PhysicalAddress.Location = New System.Drawing.Point(23, 114)
    Me.lbl_PhysicalAddress.Name = “lbl_PhysicalAddress”
    Me.lbl_PhysicalAddress.Size = New System.Drawing.Size(137, 25)
    Me.lbl_PhysicalAddress.TabIndex = 2
    Me.lbl_PhysicalAddress.Text = “Physical Address”


    Me.txt_BillingAddress.CustomButton.Image = Nothing
    Me.txt_BillingAddress.CustomButton.Location = New System.Drawing.Point(117, 2)
    Me.txt_BillingAddress.CustomButton.Name = “”
    Me.txt_BillingAddress.CustomButton.Size = New System.Drawing.Size(137, 137)
    Me.txt_BillingAddress.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
    Me.txt_BillingAddress.CustomButton.TabIndex = 1
    Me.txt_BillingAddress.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
    Me.txt_BillingAddress.CustomButton.UseSelectable = True
    Me.txt_BillingAddress.CustomButton.Visible = False
    Me.txt_BillingAddress.FontSize = MetroFramework.MetroTextBoxSize.Medium
    Me.txt_BillingAddress.Lines = New String(-1) {}
    Me.txt_BillingAddress.Location = New System.Drawing.Point(286, 142)
    Me.txt_BillingAddress.MaxLength = 32767
    Me.txt_BillingAddress.Multiline = True
    Me.txt_BillingAddress.Name = “txt_BillingAddress”
    Me.txt_BillingAddress.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
    Me.txt_BillingAddress.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txt_BillingAddress.SelectedText = “”
    Me.txt_BillingAddress.SelectionLength = 0
    Me.txt_BillingAddress.SelectionStart = 0
    Me.txt_BillingAddress.ShortcutsEnabled = True
    Me.txt_BillingAddress.Size = New System.Drawing.Size(257, 142)
    Me.txt_BillingAddress.TabIndex = 5
    Me.txt_BillingAddress.UseSelectable = True
    Me.txt_BillingAddress.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
    Me.txt_BillingAddress.WaterMarkFont = New System.Drawing.Font(“Segoe UI”, 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)


    Me.lbl_BillingAddress.AutoSize = True
    Me.lbl_BillingAddress.FontSize = MetroFramework.MetroLabelSize.Tall
    Me.lbl_BillingAddress.Location = New System.Drawing.Point(286, 114)
    Me.lbl_BillingAddress.Name = “lbl_BillingAddress”
    Me.lbl_BillingAddress.Size = New System.Drawing.Size(123, 25)
    Me.lbl_BillingAddress.TabIndex = 4
    Me.lbl_BillingAddress.Text = “Billing Address”


    Me.txt_PhoneNumber.CustomButton.Image = Nothing
    Me.txt_PhoneNumber.CustomButton.Location = New System.Drawing.Point(235, 1)
    Me.txt_PhoneNumber.CustomButton.Name = “”
    Me.txt_PhoneNumber.CustomButton.Size = New System.Drawing.Size(21, 21)
    Me.txt_PhoneNumber.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
    Me.txt_PhoneNumber.CustomButton.TabIndex = 1
    Me.txt_PhoneNumber.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
    Me.txt_PhoneNumber.CustomButton.UseSelectable = True
    Me.txt_PhoneNumber.CustomButton.Visible = False
    Me.txt_PhoneNumber.FontSize = MetroFramework.MetroTextBoxSize.Medium
    Me.txt_PhoneNumber.Lines = New String(-1) {}
    Me.txt_PhoneNumber.Location = New System.Drawing.Point(286, 315)
    Me.txt_PhoneNumber.MaxLength = 32767
    Me.txt_PhoneNumber.Name = “txt_PhoneNumber”
    Me.txt_PhoneNumber.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
    Me.txt_PhoneNumber.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txt_PhoneNumber.SelectedText = “”
    Me.txt_PhoneNumber.SelectionLength = 0
    Me.txt_PhoneNumber.SelectionStart = 0
    Me.txt_PhoneNumber.ShortcutsEnabled = True
    Me.txt_PhoneNumber.Size = New System.Drawing.Size(257, 23)
    Me.txt_PhoneNumber.TabIndex = 9
    Me.txt_PhoneNumber.UseSelectable = True
    Me.txt_PhoneNumber.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
    Me.txt_PhoneNumber.WaterMarkFont = New System.Drawing.Font(“Segoe UI”, 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)


    Me.lbl_PhoneNumber.AutoSize = True
    Me.lbl_PhoneNumber.FontSize = MetroFramework.MetroLabelSize.Tall
    Me.lbl_PhoneNumber.Location = New System.Drawing.Point(286, 287)
    Me.lbl_PhoneNumber.Name = “lbl_PhoneNumber”
    Me.lbl_PhoneNumber.Size = New System.Drawing.Size(129, 25)
    Me.lbl_PhoneNumber.TabIndex = 8
    Me.lbl_PhoneNumber.Text = “Phone Number”


    Me.txt_FaxNumber.CustomButton.Image = Nothing
    Me.txt_FaxNumber.CustomButton.Location = New System.Drawing.Point(235, 1)
    Me.txt_FaxNumber.CustomButton.Name = “”
    Me.txt_FaxNumber.CustomButton.Size = New System.Drawing.Size(21, 21)
    Me.txt_FaxNumber.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
    Me.txt_FaxNumber.CustomButton.TabIndex = 1
    Me.txt_FaxNumber.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
    Me.txt_FaxNumber.CustomButton.UseSelectable = True
    Me.txt_FaxNumber.CustomButton.Visible = False
    Me.txt_FaxNumber.FontSize = MetroFramework.MetroTextBoxSize.Medium
    Me.txt_FaxNumber.Lines = New String(-1) {}
    Me.txt_FaxNumber.Location = New System.Drawing.Point(23, 315)
    Me.txt_FaxNumber.MaxLength = 32767
    Me.txt_FaxNumber.Name = “txt_FaxNumber”
    Me.txt_FaxNumber.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
    Me.txt_FaxNumber.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txt_FaxNumber.SelectedText = “”
    Me.txt_FaxNumber.SelectionLength = 0
    Me.txt_FaxNumber.SelectionStart = 0
    Me.txt_FaxNumber.ShortcutsEnabled = True
    Me.txt_FaxNumber.Size = New System.Drawing.Size(257, 23)
    Me.txt_FaxNumber.TabIndex = 7
    Me.txt_FaxNumber.UseSelectable = True
    Me.txt_FaxNumber.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
    Me.txt_FaxNumber.WaterMarkFont = New System.Drawing.Font(“Segoe UI”, 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)


    Me.lbl_FaxNumber.AutoSize = True
    Me.lbl_FaxNumber.FontSize = MetroFramework.MetroLabelSize.Tall
    Me.lbl_FaxNumber.Location = New System.Drawing.Point(23, 287)
    Me.lbl_FaxNumber.Name = “lbl_FaxNumber”
    Me.lbl_FaxNumber.Size = New System.Drawing.Size(105, 25)
    Me.lbl_FaxNumber.TabIndex = 6
    Me.lbl_FaxNumber.Text = “Fax Number”


    Me.txt_Email.CustomButton.Image = Nothing
    Me.txt_Email.CustomButton.Location = New System.Drawing.Point(498, 1)
    Me.txt_Email.CustomButton.Name = “”
    Me.txt_Email.CustomButton.Size = New System.Drawing.Size(21, 21)
    Me.txt_Email.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
    Me.txt_Email.CustomButton.TabIndex = 1
    Me.txt_Email.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
    Me.txt_Email.CustomButton.UseSelectable = True
    Me.txt_Email.CustomButton.Visible = False
    Me.txt_Email.FontSize = MetroFramework.MetroTextBoxSize.Medium
    Me.txt_Email.Lines = New String(-1) {}
    Me.txt_Email.Location = New System.Drawing.Point(23, 369)
    Me.txt_Email.MaxLength = 32767
    Me.txt_Email.Name = “txt_Email”
    Me.txt_Email.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
    Me.txt_Email.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txt_Email.SelectedText = “”
    Me.txt_Email.SelectionLength = 0
    Me.txt_Email.SelectionStart = 0
    Me.txt_Email.ShortcutsEnabled = True
    Me.txt_Email.Size = New System.Drawing.Size(520, 23)
    Me.txt_Email.TabIndex = 11
    Me.txt_Email.UseSelectable = True
    Me.txt_Email.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
    Me.txt_Email.WaterMarkFont = New System.Drawing.Font(“Segoe UI”, 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)


    Me.lbl_Email.AutoSize = True
    Me.lbl_Email.FontSize = MetroFramework.MetroLabelSize.Tall
    Me.lbl_Email.Location = New System.Drawing.Point(23, 341)
    Me.lbl_Email.Name = “lbl_Email”
    Me.lbl_Email.Size = New System.Drawing.Size(53, 25)
    Me.lbl_Email.TabIndex = 10
    Me.lbl_Email.Text = “Email”


    Me.txt_Serial.CustomButton.Image = Nothing
    Me.txt_Serial.CustomButton.Location = New System.Drawing.Point(476, 2)
    Me.txt_Serial.CustomButton.Name = “”
    Me.txt_Serial.CustomButton.Size = New System.Drawing.Size(41, 41)
    Me.txt_Serial.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
    Me.txt_Serial.CustomButton.TabIndex = 1
    Me.txt_Serial.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
    Me.txt_Serial.CustomButton.UseSelectable = True
    Me.txt_Serial.CustomButton.Visible = False
    Me.txt_Serial.FontSize = MetroFramework.MetroTextBoxSize.Medium
    Me.txt_Serial.Lines = New String(-1) {}
    Me.txt_Serial.Location = New System.Drawing.Point(23, 423)
    Me.txt_Serial.MaxLength = 32767
    Me.txt_Serial.Multiline = True
    Me.txt_Serial.Name = “txt_Serial”
    Me.txt_Serial.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
    Me.txt_Serial.ScrollBars = System.Windows.Forms.ScrollBars.None
    Me.txt_Serial.SelectedText = “”
    Me.txt_Serial.SelectionLength = 0
    Me.txt_Serial.SelectionStart = 0
    Me.txt_Serial.ShortcutsEnabled = True
    Me.txt_Serial.Size = New System.Drawing.Size(520, 46)
    Me.txt_Serial.TabIndex = 13
    Me.txt_Serial.UseSelectable = True
    Me.txt_Serial.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
    Me.txt_Serial.WaterMarkFont = New System.Drawing.Font(“Segoe UI”, 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)


    Me.lbl_Serial.AutoSize = True
    Me.lbl_Serial.FontSize = MetroFramework.MetroLabelSize.Tall
    Me.lbl_Serial.Location = New System.Drawing.Point(23, 395)
    Me.lbl_Serial.Name = “lbl_Serial”
    Me.lbl_Serial.Size = New System.Drawing.Size(53, 25)
    Me.lbl_Serial.TabIndex = 12
    Me.lbl_Serial.Text = “Serial”


    Me.MetroButton1.FontSize = MetroFramework.MetroButtonSize.Tall
    Me.MetroButton1.Location = New System.Drawing.Point(23, 475)
    Me.MetroButton1.Name = “MetroButton1”
    Me.MetroButton1.Size = New System.Drawing.Size(126, 51)
    Me.MetroButton1.TabIndex = 14
    Me.MetroButton1.Text = “MetroButton1”
    Me.MetroButton1.UseSelectable = True


    Me.MetroButton2.FontSize = MetroFramework.MetroButtonSize.Tall
    Me.MetroButton2.Location = New System.Drawing.Point(417, 475)
    Me.MetroButton2.Name = “MetroButton2”
    Me.MetroButton2.Size = New System.Drawing.Size(126, 51)
    Me.MetroButton2.TabIndex = 15
    Me.MetroButton2.Text = “MetroButton2”
    Me.MetroButton2.UseSelectable = True


    Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
    Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
    Me.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle
    Me.ClientSize = New System.Drawing.Size(565, 548)
    Me.ControlBox = False
    Me.MaximizeBox = False
    Me.MinimizeBox = False
    Me.Name = “frm_CompanyInformation”
    Me.Resizable = False
    Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
    Me.Style = MetroFramework.MetroColorStyle.Purple
    Me.Text = “Company Information”

    End Sub

    Friend WithEvents lbl_CompanyName As MetroFramework.Controls.MetroLabel
    Friend WithEvents txt_CompanyName As MetroFramework.Controls.MetroTextBox
    Friend WithEvents txt_PhysicalAddress As MetroFramework.Controls.MetroTextBox
    Friend WithEvents lbl_PhysicalAddress As MetroFramework.Controls.MetroLabel
    Friend WithEvents txt_BillingAddress As MetroFramework.Controls.MetroTextBox
    Friend WithEvents lbl_BillingAddress As MetroFramework.Controls.MetroLabel
    Friend WithEvents txt_PhoneNumber As MetroFramework.Controls.MetroTextBox
    Friend WithEvents lbl_PhoneNumber As MetroFramework.Controls.MetroLabel
    Friend WithEvents txt_FaxNumber As MetroFramework.Controls.MetroTextBox
    Friend WithEvents lbl_FaxNumber As MetroFramework.Controls.MetroLabel
    Friend WithEvents txt_Email As MetroFramework.Controls.MetroTextBox
    Friend WithEvents lbl_Email As MetroFramework.Controls.MetroLabel
    Friend WithEvents txt_Serial As MetroFramework.Controls.MetroTextBox
    Friend WithEvents lbl_Serial As MetroFramework.Controls.MetroLabel
    Friend WithEvents MetroButton1 As MetroFramework.Controls.MetroButton
    Friend WithEvents MetroButton2 As MetroFramework.Controls.MetroButton
    End Class

  • Eric San Gabriel

    Hi, I used MetroComboBox and populated it with data from database and when I do selection of item on one combobox and press TAB on my keyboard, seems the dropdown backcolor of all comboboxes change its color with the selected style color. But when I minimize the form for a little while, it go away. Is this a normal behavior of MetroComboBox?

    Im using metroframework 1.4.0,
    I’ve tried if with .NET 4, 4 Client Profile and 4.5, same result,

    Im using VS2012 in window7 by the way.

    • It is already fixed on the latest source code which is available in GitHub. I will compile it together with other bug fixes.

  • darpan relan

    Project file must include the .NET Framework assembly ‘WindowsBase, PresentationCore, PresentationFramework’ in the reference list

  • ghz14

    I’m trying to set all forms styles using a form called settings. I was able manage and change the main form from the settings form but the settings form or the other child forms doesn’t change.

    I have this under the mainform

    private void metroLink1_Click(object sender, EventArgs e)
    frmSettings _settings = new frmSettings(this);

    _settings.StyleManager = this.StyleManager;
    _settings.ChangeAppColor += _settings_ChangeAppColor;

    anyone has any ideas on how to fix this?

  • Thomas Pieger

    Hi Dennis, i have same problem with window actions. If i press any button in MainForm, open a new Window, close this second and work in Main it takes two clicks to action on another button or control.

    And next i found out is following:
    create a metroframework window (all things in VS2015), set a tabControl, anchor
    it to top, left, right, bottom and open the form as state maximized works fine. Add a metro label, then the tabControl won´t stretch in Window-Mode maximized. I have to press the maximize Button to get to normal state and press it again. Then the controls fit to size anchored. It is with a few of controls, that they dont works with the anchor settings on window
    is opened in maximized state if they on the same form. Did you have ideas for me?


    Helpful suggestions , my business recently encountered to arrange pdf , It’s super straightforward to try and it’s effective . I heard they might have a 7 day trial ongoing

  • Mozart Ryan

    How to change the form icon (the pic next to form text) ?
    i tried to change the back image, but my form still didnt show the pic..

  • Deivid Farias

    I have a problem with passwordChar on the textbox.
    On load the form, I change this propriety of false to true, after on the checkbox in the form I change again this propriety to false, but don’t have answer in this form. The textbox never change.
    I need help.

    • Try to refresh the textbox after changing the property. MetroTextBox1.Refresh();

      • Deivid Farias

        Tks. It Works, I need make one more question:
        How use maskedbox on metrotextbox?

  • hammas

    sir plz tell 2 things how can i change the font size from tall to taller xl and large and how to code this modernmessgaebox plz tell :’)

  • Arkas

    When the program is run on Win XP fonts are standard. How to make the font used in the Metro, too, maintained? MetroFramework.Fonts DLL in your program is.

  • Mozart Ryan

    Why whenever i close a form (the form opened with showDialog) it always flickering ?
    any idea how to stop this flickering ?

  • Daniel Berg

    Hello Sir,

    it’s a nice Design for c#.

    I’m trying to edit the Text in the Metro ComboBox but I didn’t found a way to do it. It’s always shown as a DropDownList.

    Can you help me on this step?

    Best regards,

  • Omkar Salokhe

    The Style Manager theme of one form works on second form but the theme doesn’t get apply for controls on second form. how to do that

  • kiquenet kiquenet

    Winforms Modern UI Metro Framework not dead project ? Yet use it in real applications in 2017 ?

    Maybe you use Metro Framework in real applications in production for years, and you get good patterns and practices using Metro Framework .

    What’s about using TPL Tasks and Gridview-ListView-ProgressBar for long process with Metro Framework ?

    Very helpful for all community if you share your real experiencies.

  • Bryan Babila

    Hello, I just want to ask on how to disable metro tile?
    I am using C# language.

  • Juvis Kristofferson Mueda

    Hello Sir,

    Just needs some tips on how to resize the form in such a way that it doesn’t flicker. I’m trying to resize the form with panels.

    I’m just doing an incremental resize to achieve a sliding effect.

    Here’s my test code below. maybe you could give me a better approach on this. thank you.

    The initial width of the form is 412

    Private Sub MetroButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MetroButton1.Click

    While (Me.Size.Width 1600 Then
    Me.Width += 1
    MetroPanel2.Width += 1
    MetroPanel3.Width += 1
    MetroPanel4.Width += 1
    Me.Width += 20
    MetroPanel2.Width += 30
    MetroPanel3.Width += 30
    MetroPanel4.Width += 30
    End If
    End While
    ‘Me.MaximizeBox = True
    ‘Me.MinimizeBox = True
    End Sub

    If I do increment by 1 all throughout the flicker is not noticeable however it takes time to fully achieve the desired size.

  • Pradeep Dinuka

    sir. how do i write a code to metro UI close button. with confermation massage box.


    How to get metro UI Massage Box

  • Mike Bradley

    Hello when you press tab all combo box items then change to the color of what has been set in the style. Selecting an item does not remove this. How to fix?

    • Gerardo Ossio

      Did you have the anwser? i have the same error

  • Edward Soares

    I need some help with Metro UI. I have several buttons, when I click one, it stays with a different background color until another button is clicked. Almost like a menu on a web page showing it is the active page. How do I disable this behavior? Or at least modify that active color to match so it looks like its not happening?

  • Naeemurrahman Jasra

    How can I show a form in such a way that the main form in back should not be accessible using metro framework.
    e.g in simple winform applications we use form1.showdialog() and only form at top is accessible.

  • Subramanian S

    Dear Dennis, firstly let me say this is awesome work. Thanks a lot for giving this great library to us. My query is can i center align the tabs in a tab control? I want them all to appear in the center rather than from the left. Then can I add icons to the tab headers? Kindly suggest.

  • Ali Waleed

    hello Mr Denise
    I have a small issue.I’m using metro login forms and controls normaly without any problem but suddenly today when i start my project to test it i saw all metroDateTime controls style in my project was changed by itself as it shown in below picture, who can i retured its’ style as a flat style like before??

  • Arslan jappa

    do we need to put these dll file again and again for new project??

  • Agustín GL

    Hello Denric,
    First of all thanks for such a nice update on this. One small question, when distributing an app, is it necessary to copy MetroFramework.Fonts.dll when compiling, or not really? I tried not copying that, and it seems to work, but I am not really sure if it is required in older Windows distributions for the fonts to display properly.
    Thanks for your reply 🙂

  • Theodore Isiah Carson

    Trying to change the BackColor of Metro Textbox on Enter/Leave. This is not working:

    private void metroTextBox1_Enter(object sender, EventArgs e)
    this.BackColor = Color.Lime;

    I have also set UseCustomBackColor in Design Mode to True. Any help appreciated. It would be nice to have a property or two for this.


    • Theodore Isiah Carson

      I figured it out folks. You have to use the full control name (i.e.:metroTextBox1.BackColor =)


  • Bay

    Great product. I just started using it, but notice that most of the paint events are not firing. Ie… form paint, panel paint. Please help

  • Adeesanan Siva Hi sir, i have a question on Metro frame work i ‘m currently using metro frame work in my windows form c#. suddenly i won’t allow to select metro buttons, lables and some metro controls. i don’t know what was the problem? will you help me with this?

    • denricdenise

      Have you add all DLL’s on your project?