Click here to Skip to main content
16,016,394 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: convert System::String to char Pin
2bee 1-Apr-06 12:00
2bee 1-Apr-06 12:00 
Questionargs in the "new" main() Pin
leonelsr31-Mar-06 11:48
leonelsr31-Mar-06 11:48 
AnswerRe: args in the "new" main() Pin
2bee 31-Mar-06 23:00
2bee 31-Mar-06 23:00 
Questionlooping through strings C++ .NET Pin
richiebaby31-Mar-06 4:05
richiebaby31-Mar-06 4:05 
AnswerRe: looping through strings C++ .NET Pin
Saksida Bojan31-Mar-06 5:34
Saksida Bojan31-Mar-06 5:34 
GeneralRe: looping through strings C++ .NET Pin
richiebaby31-Mar-06 5:51
richiebaby31-Mar-06 5:51 
GeneralRe: looping through strings C++ .NET Pin
Saksida Bojan31-Mar-06 6:51
Saksida Bojan31-Mar-06 6:51 
GeneralRe: looping through strings C++ .NET - Figured it out Pin
richiebaby31-Mar-06 6:54
richiebaby31-Mar-06 6:54 
After a bit of hacking I have found a working solution.

Many thanks to the person who posted their code.

Here is a copy of what I was trying to achieve

<br />
private: System::Void outputToScreen()<br />
{<br />
  //Must clear the contents of the textBox for each repaint<br />
  textBox->Clear();<br />
<br />
  //New temp string for use within while loop<br />
  System::String *temp_text_string;<br />
				<br />
  //Initialise text_string<br />
  text_string = S"Hello I am a test string";<br />
				<br />
  //Declare an array, call it stringArray<br />
  Array *stringArray;<br />
 <br />
  //Fill stringArray with contents of text_string<br />
  stringArray = text_string->ToCharArray();<br />
<br />
  //Not sure what this does<br />
  IEnumerator *myEnum = stringArray->GetEnumerator();<br />
<br />
  //Loop through myEnum<br />
  while (myEnum->MoveNext())<br />
  {<br />
    //Initialise new_text_string with current value<br />
    temp_text_string = (myEnum->Current->ToString());<br />
		<br />
    //Setup up the font (currently the same for all chars - need to create another array)<br />
    textBox->SelectionFont = new System::Drawing::Font( "Arial",12,FontStyle::Italic );<br />
<br />
    //Output to richTextBox ("textBox")<br />
    textBox->SelectedText = temp_text_string;<br />
  }										<br />
<br />
}<br />


So there we have it, I am much happier now that I have something to work on.

I know it's ugly but I'm happy seeing as I've only used .NET for less than 48 hours.

Thanks again
QuestionVery strange error Pin
Joel Holdsworth30-Mar-06 11:58
Joel Holdsworth30-Mar-06 11:58 
AnswerRe: Very strange error Pin
George L. Jackson30-Mar-06 17:10
George L. Jackson30-Mar-06 17:10 
GeneralRe: Very strange error Pin
Saksida Bojan30-Mar-06 18:11
Saksida Bojan30-Mar-06 18:11 
GeneralRe: Very strange error Pin
George L. Jackson31-Mar-06 1:01
George L. Jackson31-Mar-06 1:01 
AnswerRe: Very strange error Pin
John L. DeVito30-Mar-06 23:11
professionalJohn L. DeVito30-Mar-06 23:11 
QuestionTransfer Data from SQL Database to DataTable Pin
kevin12730-Mar-06 4:45
kevin12730-Mar-06 4:45 
GeneralRe: Transfer Data from SQL Database to DataTable Pin
George L. Jackson30-Mar-06 16:49
George L. Jackson30-Mar-06 16:49 
GeneralRe: Transfer Data from SQL Database to DataTable Pin
kevin12730-Mar-06 18:18
kevin12730-Mar-06 18:18 
QuestionCopying array values into a managed structure Pin
Sangeetha.R30-Mar-06 0:14
Sangeetha.R30-Mar-06 0:14 
AnswerRe: Copying array values into a managed structure Pin
2bee 30-Mar-06 1:45
2bee 30-Mar-06 1:45 
GeneralRe: Copying array values into a managed structure Pin
Sangeetha.R30-Mar-06 18:18
Sangeetha.R30-Mar-06 18:18 
AnswerRe: Copying array values into a managed structure Pin
2bee 30-Mar-06 19:31
2bee 30-Mar-06 19:31 
QuestionChecking For Null while rasing the events Pin
Sangeetha.R30-Mar-06 0:03
Sangeetha.R30-Mar-06 0:03 
AnswerRe: Checking For Null while rasing the events Pin
Milton Karimbekallil30-Mar-06 4:08
Milton Karimbekallil30-Mar-06 4:08 
GeneralRe: Checking For Null while rasing the events Pin
Sangeetha.R30-Mar-06 21:18
Sangeetha.R30-Mar-06 21:18 
GeneralRe: Checking For Null while rasing the events Pin
Milton Karimbekallil31-Mar-06 1:54
Milton Karimbekallil31-Mar-06 1:54 
AnswerRe: Checking For Null while rasing the events Pin
2bee 31-Mar-06 3:17
2bee 31-Mar-06 3:17 

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.