473,503 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to give line break in panel in C# Windows application?

2 New Member
Hello All,

I am creating windows application in that i wan create dynamic controls so that i want to give line break after each control in panel.I had tried

panel1.Controls.Add(new LiteralControl("<BR>"));

but it gives error like :
"The type or namespace name 'LiteralControl' could not be found (are you missing a using directive or an assembly reference?)"
Also have tried adding namespace for leteral control bt it not accepting.VS10 automaticaly get restart if i trying to add system.web.dll
May 8 '13 #1
2 2545
M1kkelZU
80 New Member
What about Enviroment.NewLine(); ?
May 8 '13 #2
vijay6
158 New Member
Hey rajeshk, you can use location property. For example if you want to add two controls (two pictureboxes) one below another at run-time in your form then you can use like as follows.

Expand|Select|Wrap|Line Numbers
  1. pictureBox1.Location = new Point(12, 12);
  2. pictureBox2.Location = new Point(12, pictureBox1.Location.Y + pictureBox1.Height + 10);
May 8 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2634
by: Michael | last post by:
Hi, I have a windows service developed using c# and it needs to lunch another windows application. I have been trying to use Process class to do it but the problem is becase windows service...
6
16230
by: Nurchi BECHED | last post by:
Hello, All! I have created an application with a multiline textbox on the form. When I press a button, it has to show something and then break the line and show something else. I tried "\n",...
7
2344
by: thompson_38 | last post by:
I have a COM object that wraps a console application. This console app outputs strings, using tprintf statements, throughout execution. I would like to capture that output from the console app...
6
11191
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
1
11785
by: Thomas Reichgruber | last post by:
Hi, does anybody know how to add a linebreak dynamically to a Panel? In the code behind file aspx.cs my webapplication dynamically adds WebControls to a Panel defined in the .aspx file. This...
2
1883
by: Sherin george | last post by:
Hi everybody, I have got a conceptual issue. I have created a class application (.dll) with VB.Net and give reference to another windows application.The dll file got copied to my windows...
1
355
by: Asad | last post by:
Hi, I am trying to write my first Windows application using VB.NET and I am having some difficulties designing the UI. Basically its one Windows Form with 4 menus on the top (no drop downs)....
4
7702
by: Gav | last post by:
Hi, I am writing a windows form application (C#) which access's data from an SQL server. The SQL server is using windows authentication only. At the moment I have to grant the domain users...
3
7038
by: Sylvie | last post by:
My Windows Application has two forms, one form contains a grid (lets say Stock Listing), and the other is a form of one stock, contains some edit boxes for one stock's fields.. Is it possible to...
1
8647
by: radhikabista | last post by:
my windows application form is divided into 3 split containers or split panels now what is my problem is i need to print the contents of the middle one container even if it is not seen full. but i...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7315
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.