Click here to Skip to main content
15,917,859 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reading a binary file with multiple headers Pin
Guffa29-Oct-05 3:07
Guffa29-Oct-05 3:07 
QuestionRe: Reading a binary file with multiple headers Pin
jmac714229-Oct-05 11:16
jmac714229-Oct-05 11:16 
GeneralRe: Reading a binary file with multiple headers Pin
Guffa29-Oct-05 12:13
Guffa29-Oct-05 12:13 
QuestionRe: Reading a binary file with multiple headers Pin
jmac714229-Oct-05 15:26
jmac714229-Oct-05 15:26 
QuestionXml Help Please!!!! Pin
snouto28-Oct-05 11:04
snouto28-Oct-05 11:04 
AnswerRe: Xml Help Please!!!! Pin
enjoycrack28-Oct-05 13:01
enjoycrack28-Oct-05 13:01 
QuestionHow do I disable short cuts on a rich text box. Pin
Agyeman28-Oct-05 10:59
Agyeman28-Oct-05 10:59 
QuestionPassing Around a Textbox Reference Pin
redfish3428-Oct-05 9:45
redfish3428-Oct-05 9:45 
I am trying to write a function that will return the reference of a textbox control on a form. I come from a classic VB background. The questIon i have is how do i pass around a control in a variable? In VB, i could put the control in a generic Textbox variable and pass it around. But when i do this in C# nothing seems to happen. I am unable to change the textbox properties. What is the HowTo for C#? Thanks.


private void LoadCellMatrix()
{
int row;
int col;
System.Windows.Forms.TextBox textboxRef;

for(row = 1; row <= 4; ++row)
{
for(col = 1; col <= 4; ++col)
{
textboxRef = ReferenceCell(row, col);
textboxRef.Text = "TEST" + row + ", " + col;
}
}
}


private System.Windows.Forms.TextBox ReferenceCell(
int row,
int col)
{
string cellName;
cellName = "txtRow" + row + "Col" + col;

System.Windows.Forms.TextBox textboxRef;
// get compile error if i do not assign to something
textboxRef = this.txtRow1Col1;

switch(cellName)
{
case "txtRow1Col1":
textboxRef = this.txtRow1Col1;
break;
case "txtRow1Col2":
textboxRef = this.txtRow1Col1;
break;
}
return textboxRef;
}
AnswerRe: Passing Around a Textbox Reference Pin
Wjousts28-Oct-05 10:37
Wjousts28-Oct-05 10:37 
GeneralRe: Passing Around a Textbox Reference Pin
redfish341-Nov-05 10:40
redfish341-Nov-05 10:40 
QuestionUsing a function key as button shortcut Pin
Dan Neely28-Oct-05 8:14
Dan Neely28-Oct-05 8:14 
AnswerRe: Using a function key as button shortcut Pin
MoustafaS28-Oct-05 9:19
MoustafaS28-Oct-05 9:19 
AnswerRe: Using a function key as button shortcut Pin
leppie28-Oct-05 9:29
leppie28-Oct-05 9:29 
GeneralRe: Using a function key as button shortcut Pin
Dan Neely28-Oct-05 10:28
Dan Neely28-Oct-05 10:28 
QuestionHow can i change Windows Form in real time Pin
Yanshof28-Oct-05 7:51
Yanshof28-Oct-05 7:51 
AnswerRe: How can i change Windows Form in real time Pin
whizzs28-Oct-05 8:04
whizzs28-Oct-05 8:04 
AnswerRe: How can i change Windows Form in real time Pin
Dan Neely28-Oct-05 8:08
Dan Neely28-Oct-05 8:08 
QuestionReplacing in .NET Pin
Dwayner7928-Oct-05 5:24
Dwayner7928-Oct-05 5:24 
AnswerRe: Replacing in .NET Pin
Jon Sagara28-Oct-05 6:52
Jon Sagara28-Oct-05 6:52 
GeneralRe: Replacing in .NET Pin
Dwayner7928-Oct-05 7:13
Dwayner7928-Oct-05 7:13 
GeneralRe: Replacing in .NET Pin
Jon Sagara28-Oct-05 7:17
Jon Sagara28-Oct-05 7:17 
AnswerRe: Replacing in .NET Pin
Guffa29-Oct-05 1:18
Guffa29-Oct-05 1:18 
QuestionPDF File open Issue Pin
sreeni221928-Oct-05 5:06
sreeni221928-Oct-05 5:06 
AnswerRe: PDF File open Issue Pin
KaptinKrunch28-Oct-05 5:11
KaptinKrunch28-Oct-05 5:11 
GeneralRe: PDF File open Issue Pin
sreeni221928-Oct-05 5:25
sreeni221928-Oct-05 5:25 

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.