Click here to Skip to main content
15,913,773 members
Home / Discussions / C#
   

C#

 
Generaldeclaring array dimension and type at runtime Pin
Karl 200017-Jan-05 19:21
Karl 200017-Jan-05 19:21 
GeneralRe: declaring array dimension and type at runtime Pin
Heath Stewart18-Jan-05 6:48
protectorHeath Stewart18-Jan-05 6:48 
GeneralRe: declaring array dimension and type at runtime Pin
Karl 200018-Jan-05 6:58
Karl 200018-Jan-05 6:58 
GeneralRe: declaring array dimension and type at runtime Pin
Heath Stewart18-Jan-05 8:36
protectorHeath Stewart18-Jan-05 8:36 
GeneralRe: declaring array dimension and type at runtime Pin
Karl 200018-Jan-05 9:11
Karl 200018-Jan-05 9:11 
Generalplace a text box in C# without toolbox Pin
itssuk17-Jan-05 19:14
itssuk17-Jan-05 19:14 
GeneralRe: place a text box in C# without toolbox Pin
mhmoud rawas17-Jan-05 19:24
mhmoud rawas17-Jan-05 19:24 
GeneralRe: place a text box in C# without toolbox Pin
Heath Stewart18-Jan-05 6:30
protectorHeath Stewart18-Jan-05 6:30 
You do exactly what you see in the source code when use the designer. There's no magic like with VB6 using hidden code (though the designer region of code is collapsed, but you just expand it). Look at the source code and don't depend so much on what the designer does.

As the first reply stated, if you want a ,TextBox than use a TextBox, not a Label. But you must add the instance that you instantiated (in your example, that would be lblMessage) to the contorl collection for the parent control:
TextBox tbMessage = new TextBox();
this.Controls.Add(tbMessage); // 'this' is the current Form or UserControl
tbMessage.Location = new Point(8, 8);
Just look at the source code that the designer used. You can do all that manually, too. Most application I write I don't use the designer at all, and it results in the same code.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralNeed Code in C# for Pin
aaditya200017-Jan-05 19:12
aaditya200017-Jan-05 19:12 
GeneralRe: Need Code in C# for Pin
Christian Graus17-Jan-05 21:25
protectorChristian Graus17-Jan-05 21:25 
GeneralRe: Need Code in C# for Pin
Gregg Holter18-Jan-05 22:52
Gregg Holter18-Jan-05 22:52 
GeneralProblem in Return DataReader from a ServicedComponent object Pin
kianboo17-Jan-05 18:28
kianboo17-Jan-05 18:28 
QuestionCan asp.net use C++ DLL through C#? Pin
webdevelopex17-Jan-05 18:05
webdevelopex17-Jan-05 18:05 
AnswerRe: Can asp.net use C++ DLL through C#? Pin
Christian Graus17-Jan-05 21:27
protectorChristian Graus17-Jan-05 21:27 
GeneralRe: Can asp.net use C++ DLL through C#? Pin
webdevelopex17-Jan-05 22:43
webdevelopex17-Jan-05 22:43 
GeneralRe: Can asp.net use C++ DLL through C#? Pin
Nick Parker18-Jan-05 3:45
protectorNick Parker18-Jan-05 3:45 
GeneralRe: Can asp.net use C++ DLL through C#? Pin
Heath Stewart18-Jan-05 5:50
protectorHeath Stewart18-Jan-05 5:50 
GeneralGraphics files stumper... Pin
new_phoenix17-Jan-05 16:12
new_phoenix17-Jan-05 16:12 
GeneralRe: Graphics files stumper... Pin
cobyjone17-Jan-05 16:21
cobyjone17-Jan-05 16:21 
GeneralRe: Graphics files stumper... Pin
new_phoenix24-Jan-05 10:40
new_phoenix24-Jan-05 10:40 
GeneralRe: Graphics files stumper... Pin
Christian Graus17-Jan-05 17:24
protectorChristian Graus17-Jan-05 17:24 
GeneralRe: Graphics files stumper... Pin
new_phoenix18-Jan-05 6:15
new_phoenix18-Jan-05 6:15 
GeneralRe: Graphics files stumper... Pin
Christian Graus18-Jan-05 8:41
protectorChristian Graus18-Jan-05 8:41 
GeneralRe: Graphics files stumper... Pin
Corinna John17-Jan-05 19:53
Corinna John17-Jan-05 19:53 
GeneralRe: Graphics files stumper... Pin
new_phoenix18-Jan-05 6:31
new_phoenix18-Jan-05 6: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.