Click here to Skip to main content
15,889,096 members
Home / Discussions / C#
   

C#

 
GeneralRe: app.config wtf Pin
Ed.Poore17-Apr-08 1:13
Ed.Poore17-Apr-08 1:13 
GeneralRe: app.config wtf Pin
Razvan Dimescu17-Apr-08 6:46
Razvan Dimescu17-Apr-08 6:46 
GeneralRe: app.config wtf Pin
Ed.Poore17-Apr-08 11:35
Ed.Poore17-Apr-08 11:35 
Generalcrystall report! Pin
ali_reza_zareian17-Apr-08 0:19
ali_reza_zareian17-Apr-08 0:19 
QuestionHow to upload file onto server with credentials Pin
Chintan.Desai16-Apr-08 23:55
Chintan.Desai16-Apr-08 23:55 
AnswerRe: How to upload file onto server with credentials Pin
phannon8617-Apr-08 0:14
professionalphannon8617-Apr-08 0:14 
QuestionForm Layout at Runtime ? Pin
jamesjk16-Apr-08 23:33
jamesjk16-Apr-08 23:33 
AnswerRe: Form Layout at Runtime ? Pin
Simon P Stevens16-Apr-08 23:43
Simon P Stevens16-Apr-08 23:43 
jamesjk wrote:
Is it possible to control the layout of controls on a form at runtime.


Yes, just write code that adjust the particular properties of the controls that you want to change. e.g. If you want to change the text of a label. just do myLabel.Text = "NewText"; If you want to add new controls, you can create them just as you would with any other object, and then you just need to add them to the forms .Controls collection.

Label myNewLabel = new Label();
myNewLabel.Text = "NewText";
this.Controls.Add(myNewLabel);              // Add the new control to the Controls collection so it's displayed on the form.
myNewLabel.Left = 50;
myNewLabel.Top = 50;
myNewLabel.Visible = true;
myNewLabel.BackColor = Color.Red;


Simon

GeneralRe: Form Layout at Runtime ? Pin
jamesjk16-Apr-08 23:52
jamesjk16-Apr-08 23:52 
GeneralRe: Form Layout at Runtime ? Pin
Simon P Stevens17-Apr-08 0:22
Simon P Stevens17-Apr-08 0:22 
QuestionHow to insert a control in grid view - C# windows [modified] Pin
NarVish16-Apr-08 23:25
NarVish16-Apr-08 23:25 
AnswerRe: How to insert a control in grid view - C# windows Pin
ali_reza_zareian17-Apr-08 0:21
ali_reza_zareian17-Apr-08 0:21 
Generalsingle selection across ListBoxes Pin
Maddie from Dartford16-Apr-08 22:57
Maddie from Dartford16-Apr-08 22:57 
GeneralRe: single selection across ListBoxes Pin
Simon P Stevens16-Apr-08 23:37
Simon P Stevens16-Apr-08 23:37 
GeneralRe: single selection across ListBoxes Pin
Maddie from Dartford16-Apr-08 23:53
Maddie from Dartford16-Apr-08 23:53 
GeneralRe: single selection across ListBoxes Pin
Simon P Stevens17-Apr-08 0:18
Simon P Stevens17-Apr-08 0:18 
QuestionProgram with SQL Support Pin
m1n1me16-Apr-08 22:57
m1n1me16-Apr-08 22:57 
GeneralRe: Program with SQL Support Pin
ali_reza_zareian17-Apr-08 0:28
ali_reza_zareian17-Apr-08 0:28 
GeneralRe: Program with SQL Support Pin
m1n1me17-Apr-08 18:44
m1n1me17-Apr-08 18:44 
General'System.StackOverflowException' [modified] Pin
cocoonwls16-Apr-08 22:52
cocoonwls16-Apr-08 22:52 
GeneralRe: 'System.StackOverflowException' Pin
Simon P Stevens16-Apr-08 23:34
Simon P Stevens16-Apr-08 23:34 
GeneralRe: 'System.StackOverflowException' Pin
cocoonwls17-Apr-08 0:07
cocoonwls17-Apr-08 0:07 
GeneralRe: 'System.StackOverflowException' Pin
Simon P Stevens17-Apr-08 0:14
Simon P Stevens17-Apr-08 0:14 
GeneralQyery Builder Pin
Muneer Safi16-Apr-08 22:45
Muneer Safi16-Apr-08 22:45 
QuestionRe: Qyery Builder Pin
ali_reza_zareian17-Apr-08 0:31
ali_reza_zareian17-Apr-08 0:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.