TEP , The Engineering Projects , Author Welcome! Syed Zain Nasir Mechatronics Engineer TEP , The ENgineering Projects , TEP Badge TEP , The Engineering Projects , Ratting Background 7.5 7.5/10
TEP , The Engineering Projects , Rating Percentage Background Reputation Score 55 / 100
c# controls, C# control, controls in c#, c#programming for controls
TEP , The Engineering Projects , Boxes

How to Add C# Controls in Windows Form ???

TEP , THe Engineering Projects , Shares 2.5K Views
TEP , The ENgineering Projects , Reaction 40
TEP , The ENgineering Projects , Reaction 700
TEP , The ENgineering Projects , Reaction 60
TEP , The ENgineering Projects , Reaction 25
TEP , The ENgineering Projects , Reaction 60
TEP , The Engineering Projects , Pintrest TEP , The Engineering Projects , Pintrest TEP , The Engineering Projects , Pintrest TEP , The Engineering Projects , Pintrest TEP , The Engineering Projects , Pintrest
Shares: 691
TEP , The Engineering Projects , PCBWAY

c# controls, C# control, controls in c#, c#programming for controls
Hello everyone, hope you all are fine and having fun with your lives. Today, I am going to show you How to add C# Controls in your project. In our previous tutorial, we have seen an Introduction to C# Windows Forms in which we have created our first project and then we have discussed all about its different features like How to use Properties etc. and if you haven't read it yet then I would suggest you to read that one first as I am gonna continue from that tutorial onward.

So, I am assuming that you have read Introduction to C# Windows Forms and you have your first project created and ready to use. So, if you have dne exactly as I have shown in my previous tutorial then you have a for as shown in the below figure:

windows forms programming in c# , c# windows forms, windows forms in c#, c# windows form, c# windows form programming
So, now we are gonna add some C# controls in this Windows form. So, let's get started with How to add C# Controls in it.

How to add C# Controls ???

  • In our previous tutorial, we have discussed the Toolbox, which is available on the left side of your project.
  • All the components in the toolbox are shown in the below figure:
windows forms programming in c# , c# windows forms, windows forms in c#, c# windows form, c# windows form programming
  • These are a lot of controls and we will cover most of them in our coming tutorials but rite now we are just interested in knowing How to add these C# Controls in Windows Form we created in our previous tutorial.
  • So, the first C# Control I am gonna use is the Text Box, which is present in the Common Controls category.
  • So, what you need to do is to drag this Text Box from toolbox to your Windows Form and then it will be placed on your Windows Form as shown in below figure:
c# controls, C# control, controls in c#, c#programming for controls
  • Now you can see in the above figure that our Form has a new C# Control in it which is a Text Box.
  • Now when you select this Text Box then its Properties will open up in the Properties Section.
  • From its Properties you can change many of its attributes.
  • The two main attributes in Properties of any C# Controls are Name and Text.
  • Name is the name of that Control with which we call it when we writing the code for that control.
  • Text is the text which appears on that Control for user to view.
  • Let me add another C# control on this Windows Form i.e. Button and then show you the difference between this Text and Name Property.
  • So, drag a Button from the Toolbox and place it on this Windows Form as shown in below Figure:
c# controls, C# control, controls in c#, c#programming for controls
  • So, now we have two C# Controls on our Windows Form.
  • Now I will select the Button and then its Properties will open up in the Properties Section and I am gonna change its Text to Click Here as shown in below figure:
c# controls, C# control, controls in c#, c#programming for controls
  • Now, lets see in the Form, what's written on the Button. :P
c# controls, C# control, controls in c#, c#programming for controls
  • Wow the magic happened :D and what we have written in the Text Section of the Properties of this Button has appeared on it.
  • So, that's How the Text Property works. Whatever you written in the Text Section is appeared on that C# Control.
  • The Name of Button Control is still button1 so whenever I am gonna call this button in the back end code I will use that Name.
  • We are gonna do this in the next tutorial.
So, that's all for today. I hope you guys now have the idea How to add C# Controls in the Windows Form. In the coming tutorial, I am gonna add code behind each of these controls and will let you know How to use them. So, till then take care and have fun !!! :)
TEP , The Engineering Projects , Tags
c# controls
C# control
controls in c#
c#programming for controls
TEP , The Engineering Projects , Comments

Write a Comment

TEP , The Engineering Projects , WordPress TEP , The Engineering Projects , Google TEP , The Engineering Projects , Twitter TEP , The Engineering Projects , Facebook TEP , The Engineering Projects , User
TEP , The Engineering Projects , Robot
TEP , The Engineering Projects , Comments Comments on ‘’ How to Add C# Controls in Windows Form ??? ‘’ (0)
TEP , The Engineering Projects , About TEP , The Engineering Projects , About Shadow

Top PCB Design Service

PCBA
TEP , The Engineering Projects , JLCPCB
PCB
TEP , The Engineering Projects , JLCPCB
TEP , The Engineering Projects , About TEP , The Engineering Projects , About Shadow

Embedded Tools

ARDINO TEP , The Engineering Projects , JLCPCB
TEP , The Engineering Projects , About TEP , The Engineering Projects , About Shadow

Subscribe Now !!!

Learn Free Pro Tricks

TEP , The Engineering Projects , Mail Receive Quality Tutorials Straight in your Inbox by Submitting your Email ID Below
TEP , The Engineering Projects , Mail TEP , The Engineering Projects , Mail Shadow
TEP , The Engineering Projects , Mail Robot TEP , The Engineering Projects , Mail Robot Shadow TEP , The Engineering Projects , Mail Robot Shadow
TEP , The Engineering Projects , About TEP , The Engineering Projects , About Shadow

Engineering Books

TEP , The Engineering Projects , Arduino Programming Book
SALE $20
Text Book for arduino $20
TEP , The Engineering Projects , Rating Stars (5.0)
TEP , The Engineering Projects , Arduino Programming Book
SALE $20
Text Book for Raspberry Pi $20
TEP , The Engineering Projects , Rating Stars (3.0)
TEP , The Engineering Projects , Arduino Programming Book
SALE $20
Text Book for arduino $20
TEP , The Engineering Projects , Rating Stars (4.7)
TEP , The Engineering Projects , Arduino Programming Book
SALE $20
Text Book for Raspberry Pi $20
TEP , The Engineering Projects , Rating Stars (5.0)
TEP , The Engineering Projects , TEP Robot TEP , The Engineering Projects , TEP Robot Shadow TEP , The Engineering Projects , TEP Robot Shadow
TEP , The Engineering Projects , About TEP , The Engineering Projects , About Shadow

Categories

TEP , The Engineering Projects , Arduino
TEP , The Engineering Projects , Notification 20K
TEP , The Engineering Projects , Tick 900
TEP , The Engineering Projects , Views 900
TEP , The Engineering Projects , Comments 20K
TEP , The Engineering Projects , Arduino
TEP , The Engineering Projects , Notification 20K
TEP , The Engineering Projects , Tick 900
TEP , The Engineering Projects , Views 900
TEP , The Engineering Projects , Comments 20K
TEP , The Engineering Projects , Arduino
TEP , The Engineering Projects , Notification 20K
TEP , The Engineering Projects , Tick 900
TEP , The Engineering Projects , Views 900
TEP , The Engineering Projects , Comments 20K
TEP , The Engineering Projects , Arduino
TEP , The Engineering Projects , Notification 20K
TEP , The Engineering Projects , Tick 900
TEP , The Engineering Projects , Views 900
TEP , The Engineering Projects , Comments 20K
TEP , The Engineering Projects , Arduino
TEP , The Engineering Projects , Notification 20K
TEP , The Engineering Projects , Tick 900
TEP , The Engineering Projects , Views 900
TEP , The Engineering Projects , Comments 20K