C# - DropDown Panel in Windows Form Application C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.พ. 2025
  • Hello Friends, This is SaLaaR HuSyN, in this very Quick tutorial we'll learn how to design a custom dropdown menu using Panel in windows form application C#.
    Download Source Code:
    github.com/SaL...
    ++++++++++++++++++++++++++++++++++++++++++++
    For Android Ui Tutorials, Please Subscribe Our Channel Android Ui Academy:
    / @androiduiacademy6689
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    if You Have any Query, feel free to contact Us on Facebook:
    / csharpuiacademy
    ++++++++++++++++++++++++++++++++++++++++++++
    Please Subscribe for more Videos.

ความคิดเห็น • 88

  • @demiladeadeisrael799
    @demiladeadeisrael799 5 ปีที่แล้ว +10

    thanks a lot, still saving projects in 2019!! ; )

  • @JuanMLomas
    @JuanMLomas ปีที่แล้ว +1

    A simple but effective solution!, thank you so much!.

  • @katerose6161
    @katerose6161 5 ปีที่แล้ว +3

    Thank You for the excellent solution. I'm going to use this method in my project! Thanks a lot again

  • @burgerlx8871
    @burgerlx8871 6 ปีที่แล้ว +3

    Just what i was looking for! Thank you!

  • @abeyuassefa7861
    @abeyuassefa7861 6 หลายเดือนก่อน

    it works for me, thank you a lot brother.

  • @tgk3445
    @tgk3445 8 หลายเดือนก่อน

    Very good! Thanks for your help man!

  • @Tresordiwata100
    @Tresordiwata100 5 ปีที่แล้ว +1

    Thanks bro. You have helped much

  • @justsomekiwiguy2930
    @justsomekiwiguy2930 2 ปีที่แล้ว

    Just what I needed. Thanks!

  • @gillianfowler1892
    @gillianfowler1892 4 ปีที่แล้ว +4

    Thank you so much for this! Question, how do you code it when you want to have multiple dropdown panels underneath each other that close when you open a new one?

    • @twoocean8012
      @twoocean8012 ปีที่แล้ว

      Did you find a solution to this?

  • @jaimeelipascua8528
    @jaimeelipascua8528 2 ปีที่แล้ว

    thanks for this man,..keep it up..

  • @JuliaFile
    @JuliaFile ปีที่แล้ว

    thanks for the tutorial. this is very useful and works. but when the menu goes down. the buttons at the bottom are hidden, covered by the drop menu. how do you solve it?

  • @jojocheng289
    @jojocheng289 6 ปีที่แล้ว +1

    Nice example. Thanks

  • @CSharpCodeAcademy
    @CSharpCodeAcademy 6 ปีที่แล้ว +1

    what a mind bro, amazing, keep it up Salaar HusYn

  • @shayanali2598
    @shayanali2598 6 ปีที่แล้ว +1

    ma sha Allah zabardast bro

  • @TXNNGVGX
    @TXNNGVGX 3 หลายเดือนก่อน

    It's a great video, but how do I make the selected button take the place of the main one?

  • @Kira7542
    @Kira7542 2 ปีที่แล้ว

    Thanks, this really helped :-)

  • @santhoshreddy9161
    @santhoshreddy9161 5 ปีที่แล้ว +1

    Thanks a lot

  • @falaksyed2019
    @falaksyed2019 3 ปีที่แล้ว

    Thank you so so much

  • @manjeetnandal1
    @manjeetnandal1 5 ปีที่แล้ว

    Many usefull.
    Great thanks!

  • @rosemaryroopnarine9443
    @rosemaryroopnarine9443 ปีที่แล้ว

    Just what I was looking for, but if each button represents a form how do I get the text of the form name to be seen.

  • @ShoaibKhan-rg6uz
    @ShoaibKhan-rg6uz 6 ปีที่แล้ว +1

    Outstanding bro keep it up

  •  6 ปีที่แล้ว +3

    Excelente solución en C#. ;-)

  • @gokhanzaric3903
    @gokhanzaric3903 6 ปีที่แล้ว +1

    Thank You Brother.

  • @anandranga3428
    @anandranga3428 6 ปีที่แล้ว +1

    Superb bro

  • @AMIRKHAN-dm2fm
    @AMIRKHAN-dm2fm 6 ปีที่แล้ว +1

    Very Nice

  • @nove1398
    @nove1398 4 ปีที่แล้ว

    What is the best way to open a new form and close the current?

  • @arczhar1204
    @arczhar1204 6 ปีที่แล้ว +1

    Thanks you bro!

  • @christolb59
    @christolb59 5 ปีที่แล้ว

    Brief and clear, thanks a lot, and really, the sound is also good, let me know the name of music :)

  • @erlindkadriu4547
    @erlindkadriu4547 4 ปีที่แล้ว +1

    Can I use 2 timers in one form? I am actually using but i have a crash I don't know why...Can you help me ?
    By the way thanks a lot for this solution!

    • @CUiAcademy
      @CUiAcademy  4 ปีที่แล้ว

      Hi Erlind, Please explain your problem by writing an email to info@csharpui.com. I'll try my best to solve your problem.. :)

    • @erlindkadriu4547
      @erlindkadriu4547 4 ปีที่แล้ว

      @@CUiAcademy I fixed the problem, it was crashing between timers :'D thanks for caring...

  • @roeljohnrebosa1767
    @roeljohnrebosa1767 6 ปีที่แล้ว +1

    Thanks

  • @蔡尚宏-e6u
    @蔡尚宏-e6u 6 ปีที่แล้ว

    Why the button10.11.12 won't cover the DropDown Panel?They will move when the Panel Drop.Want to know~Thanks for help.

  • @sumitrajput2404
    @sumitrajput2404 ปีที่แล้ว

    sir agr sabhi batton me, button 5 jaisa krna ho to kya kre

  • @aerithmint8041
    @aerithmint8041 5 ปีที่แล้ว +2

    Thank you for this video, help a lot ♥️ but one more thing, how can I display another user control when clicking the button in the drop down panel? Pls reply, I need ur help😭 - it's okay, already can XD

    • @CUiAcademy
      @CUiAcademy  5 ปีที่แล้ว +3

      during form designing (before reducing the size of Sub Panel), just code to display user control on your form... :) :) please let me know if you have any query... thanks for watching my videos... :)

    • @aerithmint8041
      @aerithmint8041 5 ปีที่แล้ว

      @@CUiAcademy Thank you 🥰

  • @ErkanOkman
    @ErkanOkman 6 ปีที่แล้ว +2

    👍👏

  • @TheOussamaess1958
    @TheOussamaess1958 5 ปีที่แล้ว +1

    I like It

  • @CowLevel007
    @CowLevel007 6 ปีที่แล้ว +2

    That was so cool!

  • @jorgeluna3096
    @jorgeluna3096 5 ปีที่แล้ว +1

    Thanks, but how can i do for 2 o more panels?

  • @Thepostroun
    @Thepostroun 4 ปีที่แล้ว

    thank you very much that helps L))

  • @hamzakhan-go3ct
    @hamzakhan-go3ct 6 ปีที่แล้ว +2

    what is isCollapsed and i have done each nd everything same except that arrow sign so where i should write timer1.start(); plx rep thanks

    • @CUiAcademy
      @CUiAcademy  6 ปีที่แล้ว

      Hi Hamza,... isCollapsed is a bool variable which we've declared earlier, It will become true when the panel is collapsed..

  • @Shashi24ful
    @Shashi24ful 6 ปีที่แล้ว +1

    no Download link on the description 😞

  • @simpleman7171
    @simpleman7171 4 ปีที่แล้ว

    dude can u explain about ur code i wanna get it ty so much

  • @457Deniz457
    @457Deniz457 6 ปีที่แล้ว +1

    uhhh nice, will try that one out :D

  • @sararana319
    @sararana319 6 ปีที่แล้ว +2

    my dropdown panel is overlapping on the other button what should i do?

    • @CUiAcademy
      @CUiAcademy  6 ปีที่แล้ว

      Hi Sara Rana. Please use Flowlayout Panel for your Container (Main Panel). I hope this will work for you.. :)

    • @angelaochoa7594
      @angelaochoa7594 5 ปีที่แล้ว

      @@CUiAcademy Is there a way to make the other buttons drop down on a regular Panel?

  • @codex4483
    @codex4483 4 ปีที่แล้ว

    what if i have to add more than 100 buttons,,please help

  • @vannapro3733
    @vannapro3733 6 ปีที่แล้ว

    Could you make video about form responsive with screen.

  • @zerosandones7547
    @zerosandones7547 3 ปีที่แล้ว

    how to make this dropdown dynamic? add a dropdown button every time a user adds an item in the database.

  • @muhammadadrees8257
    @muhammadadrees8257 6 ปีที่แล้ว

    how the panel is closed automatically when opening any other panel.. Plz Help

  • @ianaballe9629
    @ianaballe9629 5 ปีที่แล้ว

    what if I want a dropdown panel inside a dropdown panel?

  • @makjacky2280
    @makjacky2280 4 ปีที่แล้ว

    amazing!!!

  • @SamSung-bc4th
    @SamSung-bc4th 5 ปีที่แล้ว +2

    It works. Fast time click the button drop down. but how the panel is closed automatically when i click another button.
    #SaLaaR_HuSceyN

    • @CUiAcademy
      @CUiAcademy  5 ปีที่แล้ว

      simple.. Just check the height of panel dropdown and if its width is greater then call the on click event of ButtonCollapse like,
      if(panelDropDown.Height < 0)
      {
      ButtonCollapse.OnClick(sender,e);
      }
      it will close the drop down panel if it is already opened..

    • @CUiAcademy
      @CUiAcademy  5 ปีที่แล้ว

      Change the 0 inside the if condition with the minimum height which you set for the panel dropdown. :) I hope it will work for you.. :)

    • @SamSung-bc4th
      @SamSung-bc4th 5 ปีที่แล้ว

      @@CUiAcademy Sorry for that it's not working.
      private void tmr1_stp_dd_tick(object sender, EventArgs e)
      {
      if (isCollapsed)
      {
      pnl_stp_dd.Height += 10;
      if (pnl_stp_dd.Size == pnl_stp_dd.MaximumSize)
      {
      tmr1_stp_dd.Stop();
      isCollapsed = false;
      }
      }
      else
      {
      pnl_stp_dd.Height -= 0;
      if (pnl_stp_dd.Size == pnl_stp_dd.MinimumSize)
      {
      tmr1_stp_dd.Stop();
      isCollapsed = true;
      }
      }
      }
      ::or::
      private void stp_btn_click(object sender, EventArgs e)
      {
      tmr1_stp_dd.Start();
      }
      if(pnl_stp_dd.Height < 0)
      {
      ButtonCollapse.OnClick(sender,e);
      }

  • @softfiscalpb674
    @softfiscalpb674 4 ปีที่แล้ว

    que massa.
    gostei.

  • @dhokhumiya8173
    @dhokhumiya8173 6 ปีที่แล้ว

    bro my problem shows a collapsed arrow image add plz help me

  • @pavankulkarni9080
    @pavankulkarni9080 6 ปีที่แล้ว +1

    Error at statement - panelDropDown.Height += 10;
    Error msg - Invalid expression term and panelDropdown does not exist in the current context

    • @CUiAcademy
      @CUiAcademy  6 ปีที่แล้ว

      panelDropDown is the name of the panel which contains your button.... just rename that panel or replace panelDropDown with its name,,, :)

    • @pavankulkarni9080
      @pavankulkarni9080 6 ปีที่แล้ว +1

      Thank you so much, finally I executed program. once again thank you so much for your reply c# UI academy

  • @codingislife6387
    @codingislife6387 6 ปีที่แล้ว +1

    So Cool ...----------> Thanks

  • @tiagorodrigues6689
    @tiagorodrigues6689 5 ปีที่แล้ว +1

    can you send me the link of your project pls!!
    nice video bro!

    • @CUiAcademy
      @CUiAcademy  5 ปีที่แล้ว

      Please download the source code from this link.. github.com/SaLaaRHuSyN/DropDownPanel

  • @jamesmoose7196
    @jamesmoose7196 6 ปีที่แล้ว +1

    Cool ¡¡

  • @n0stal6ic2
    @n0stal6ic2 4 ปีที่แล้ว

    the menu wont drop down at all for me

  • @debashishbasu1505
    @debashishbasu1505 5 ปีที่แล้ว

    How to do this same thins in visual basic??
    Please help me

  • @walodari7659
    @walodari7659 5 ปีที่แล้ว +1

    but ty for idea

  • @zerosandones7547
    @zerosandones7547 5 ปีที่แล้ว

    how to do this with 2 dropdowns?

  • @somedudeonyoutubefrfr
    @somedudeonyoutubefrfr 6 ปีที่แล้ว +1

    Im still asking myself: why do you refresh your desktop at every start of an video 😅

    • @CUiAcademy
      @CUiAcademy  6 ปีที่แล้ว +1

      The reason behind this is very simple, many viewers just ask about, which version of visual studio that I am using in this video, because some techniques don't work in older versions... So I start my every video from scratch...

    • @somedudeonyoutubefrfr
      @somedudeonyoutubefrfr 6 ปีที่แล้ว +1

      @@CUiAcademy Ok ^^ Thank you for your fast answer :D
      Please continue with this content

  • @457Deniz457
    @457Deniz457 6 ปีที่แล้ว

    Download Link Missing/Reup?^^

  • @user_bazsi
    @user_bazsi 2 ปีที่แล้ว

    Inertia minecraft client? :'D

  • @jonas8799
    @jonas8799 5 ปีที่แล้ว

    It wont come up again .-..
    help

  • @zoneinity
    @zoneinity 5 ปีที่แล้ว

    I can only close it i cant opne it

  • @pavankulkarni9080
    @pavankulkarni9080 6 ปีที่แล้ว

    I’m getting error. Anybody can help me ?

  • @satine_go
    @satine_go 4 ปีที่แล้ว +1

    private void timer1_Tick(object sender, EventArgs e)
    {
    if (isCollapsed)
    {
    button5.Image = Resources.bt_dw1;
    panelDropDown.Height -= 10;
    if (panelDropDown.Size == panelDropDown.MinimumSize)
    {
    timer1.Stop();
    isCollapsed = false;
    }
    }
    else
    {
    button5.Image = Resources.bt_up1;
    panelDropDown.Height += 10;
    if (panelDropDown.Size == panelDropDown.MaximumSize)
    {
    timer1.Stop();
    isCollapsed = true;
    }

  • @pauloafonsokratagon4687
    @pauloafonsokratagon4687 5 ปีที่แล้ว

    PQP, nao tava funcionando porque troquei digitei "+=" ao inves de "-+"!!! kkkkkk

  • @thebandar94
    @thebandar94 3 ปีที่แล้ว

    thanks a lot ..

  • @NarakirinIntharachit
    @NarakirinIntharachit 2 ปีที่แล้ว

    thank you very much.