Hi, when a Control needs a string (e.g. the Text property of a Label), and your value isn't a string yet, I suggest you use the ToString() method which exists for all objects. Most often there are several overloads, one without any arguments producing a standard string representation, and one or more accepting some formatting information. Example: int.ToString("X8") would result in an 8-digit hexadecimal value. BTW: I would rather write if (locP->Checked)... than if (locP->Checked == true)... although both have exactly the same meaning. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets