Click here to Skip to main content
15,891,204 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to resolve network related or instance specific error Pin
NeillJam15-Oct-15 23:24
NeillJam15-Oct-15 23:24 
QuestionHow do I download big file of applications Pin
Member 1201610615-Oct-15 14:58
Member 1201610615-Oct-15 14:58 
SuggestionRe: How do I download big file of applications Pin
Richard MacCutchan15-Oct-15 23:03
mveRichard MacCutchan15-Oct-15 23:03 
GeneralRe: How do I download big file of applications Pin
Member 1201610615-Oct-15 23:31
Member 1201610615-Oct-15 23:31 
GeneralRe: How do I download big file of applications Pin
molesworth16-Oct-15 2:43
molesworth16-Oct-15 2:43 
AnswerRe: How do I download big file of applications Pin
Richard Deeming16-Oct-15 2:44
mveRichard Deeming16-Oct-15 2:44 
QuestionI try to dynamically generate a name for my objects Pin
Member 1019526215-Oct-15 10:41
Member 1019526215-Oct-15 10:41 
AnswerRe: I try to dynamically generate a name for my objects Pin
BillWoodruff15-Oct-15 18:56
professionalBillWoodruff15-Oct-15 18:56 
A simple way to do this is to define a Method that creates the ComboBoxes and automatically adds the identifier to their Name. Like this:
C#
// static so that all instances of the Class/Form/whatever use the same counter
private static int ComboBoxCounter = 0;

private const string ComboBoxNameBase = "ComboBox";

// keep a List of references to new ComboBoxes created
public List<ComboBox> TheComboBoxes = new List<ComboBox>();

public ComboBox GetNewComboBox()
{
    ComboBox cmbx = new ComboBox {Name = string.Format("{0}{1}",ComboBoxNameBase, ComboBoxCounter++)};
    TheComboBoxes.Add(cmbx);
    return cmbx;
}

// sample usage
// panel1.Controls.Add(GetNewComboBox()); // ComboBox0 added to Panel
// panel1.Controls.Add(GetNewComboBox()); // ComboBox1 added to Panel

«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.

GeneralRe: I try to dynamically generate a name for my objects Pin
Member 1019526219-Oct-15 7:11
Member 1019526219-Oct-15 7:11 
QuestionAccessing dynamically generated textboxes Pin
KakitaIppatsu15-Oct-15 5:43
KakitaIppatsu15-Oct-15 5:43 
AnswerRe: Accessing dynamically generated textboxes Pin
OriginalGriff15-Oct-15 6:11
mveOriginalGriff15-Oct-15 6:11 
GeneralRe: Accessing dynamically generated textboxes Pin
KakitaIppatsu15-Oct-15 6:39
KakitaIppatsu15-Oct-15 6:39 
GeneralRe: Accessing dynamically generated textboxes Pin
OriginalGriff15-Oct-15 7:06
mveOriginalGriff15-Oct-15 7:06 
AnswerRe: Accessing dynamically generated textboxes Pin
BillWoodruff15-Oct-15 6:52
professionalBillWoodruff15-Oct-15 6:52 
GeneralRe: Accessing dynamically generated textboxes Pin
KakitaIppatsu15-Oct-15 7:47
KakitaIppatsu15-Oct-15 7:47 
QuestionThe “Microsoft.CodeAnalysis.BuildTasks.Csc” task could not be loaded from the assembly Pin
Member 1204569215-Oct-15 3:31
Member 1204569215-Oct-15 3:31 
QuestionTime to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 16:10
LeHuuTien14-Oct-15 16:10 
AnswerRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
BillWoodruff14-Oct-15 20:37
professionalBillWoodruff14-Oct-15 20:37 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 22:27
LeHuuTien14-Oct-15 22:27 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
BillWoodruff14-Oct-15 22:38
professionalBillWoodruff14-Oct-15 22:38 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:10
LeHuuTien14-Oct-15 23:10 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Pete O'Hanlon14-Oct-15 23:13
mvePete O'Hanlon14-Oct-15 23:13 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:22
LeHuuTien14-Oct-15 23:22 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Pete O'Hanlon14-Oct-15 23:42
mvePete O'Hanlon14-Oct-15 23:42 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:45
LeHuuTien14-Oct-15 23:45 

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.