Click here to Skip to main content
15,867,765 members
Home / Discussions / C#
   

C#

 
GeneralRe: Variable Get Set Pin
I Believe In GOD15-Oct-09 7:42
I Believe In GOD15-Oct-09 7:42 
AnswerRe: Variable Get Set Pin
Henry Minute15-Oct-09 6:55
Henry Minute15-Oct-09 6:55 
GeneralRe: Variable Get Set Pin
I Believe In GOD15-Oct-09 7:40
I Believe In GOD15-Oct-09 7:40 
QuestionCheckBox limiting. [modified] Pin
Gregory Bryant15-Oct-09 5:05
Gregory Bryant15-Oct-09 5:05 
AnswerRe: ControlBox limiting. Pin
Luc Pattyn15-Oct-09 5:13
sitebuilderLuc Pattyn15-Oct-09 5:13 
GeneralRe: ControlBox limiting. Pin
Gregory Bryant15-Oct-09 5:15
Gregory Bryant15-Oct-09 5:15 
GeneralRe: ControlBox limiting. Pin
Saksida Bojan15-Oct-09 6:06
Saksida Bojan15-Oct-09 6:06 
QuestionPassing Label's Name within a Class outside of the Form [modified] Pin
yogi_bear_7915-Oct-09 4:58
yogi_bear_7915-Oct-09 4:58 
I have a Form called frmMain

In a differant class withing the same namespace I have a method (snippet):

frmMain Form1 = new frmMain();
Results(Form1.Label1);


I had expected to get the Labels name, instead I get the Labels' text. I tried Form1.Label1.Name, but that passes the name as a string versus a Label.

I am using an Event as explaind by DaveyM69 in a previous post of mine.

void Results (Label lbl_1)
{
     OnUpdateLabels(new LabelsEventArgs(lbl_1));
}


Everything works and is passed over to the Forms methods, but since I am not passing a Lable name nothing happens. What I am trying to do is change the ForeColor of a lable. There are multiple labels that could be called to change. I thought about changeing everything to a string and passing the Form1.Label1.Name but I couldn't figure out, once in the Forms method how to conver the string into a Label.

modified on Thursday, October 15, 2009 11:13 AM

AnswerRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 5:20
sitebuilderLuc Pattyn15-Oct-09 5:20 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
yogi_bear_7915-Oct-09 5:47
yogi_bear_7915-Oct-09 5:47 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 5:55
sitebuilderLuc Pattyn15-Oct-09 5:55 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
yogi_bear_7915-Oct-09 6:23
yogi_bear_7915-Oct-09 6:23 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 6:56
sitebuilderLuc Pattyn15-Oct-09 6:56 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
yogi_bear_7915-Oct-09 7:58
yogi_bear_7915-Oct-09 7:58 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 8:24
sitebuilderLuc Pattyn15-Oct-09 8:24 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
yogi_bear_7915-Oct-09 8:44
yogi_bear_7915-Oct-09 8:44 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 9:05
sitebuilderLuc Pattyn15-Oct-09 9:05 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
yogi_bear_7915-Oct-09 10:43
yogi_bear_7915-Oct-09 10:43 
GeneralRe: Passing Label's Name within a Class outside of the Form Pin
Luc Pattyn15-Oct-09 10:55
sitebuilderLuc Pattyn15-Oct-09 10:55 
AnswerRe: Passing Label's Name within a Class outside of the Form Pin
Ravi Bhavnani15-Oct-09 5:37
professionalRavi Bhavnani15-Oct-09 5:37 
QuestionParse SQL and replace column name with another name Pin
AhmedMasum15-Oct-09 4:27
AhmedMasum15-Oct-09 4:27 
AnswerRe: Parse SQL and replace column name with another name Pin
PIEBALDconsult15-Oct-09 4:56
mvePIEBALDconsult15-Oct-09 4:56 
GeneralRe: Parse SQL and replace column name with another name Pin
AhmedMasum17-Oct-09 2:37
AhmedMasum17-Oct-09 2:37 
QuestionChange color of RibbonControl Pin
yogesh_softworld12315-Oct-09 3:47
yogesh_softworld12315-Oct-09 3:47 
AnswerRe: Change color of RibbonControl Pin
Henry Minute15-Oct-09 4:56
Henry Minute15-Oct-09 4:56 

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.