Posts

Showing posts with the label window application

how to use scrollbar to TableLayoutPanel in c# windows application

Hi All, sometimes requirement is to show lot of data on the form but there is no space, In HTML and Web Technologies , it automatically makes scroll bar but if we can to do same in c# winform? And that too for TableLayoutPanel ? Below is simple procedure , only 3 steps and you are done. Step1: // TableLayoutPanel Initialization             TableLayoutPanel panel = new TableLayoutPanel(); Step2:  //remove any Autosize for TableLayoutPanel is there in code // panel.AutoSize = true; Step3: // Add MaximumSize and AutoScroll panel.MaximumSize = new Size(0,200);             panel.AutoScroll = true; Please comment if you have any thought on this or better solution. Thanks Abhi

How to add Color in Designer class in c# .

Hi All, In C# control property I am able to find only limited colors, there are custom colors but I was able to use only those which are already there.  Now as per my requirement I want to add color of my choice to my control. We can use #FFFF using # and alphabet , So there should be other way too. For me below code works perfect :   this . BackColor = Color . FromArgb ( 255 , 232 , 232 );   if you go to Color Picker you can see that after color code which start with # there is numbers also .    Link : Color Picker   Thanks Abhi