Click here to Skip to main content
       

Managed C++/CLI

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Display only 2 digs in string in label.memberSøren Lyder Nielsen23 Apr '13 - 2:26 
Be cource the errorcodes I got was from MS Visual C++ 2010.
I thought it might explain to you why I got thoose errorcodes in C++.
 
Its C++ I am Using.
GeneralRe: Display only 2 digs in string in label.mvpRichard MacCutchan23 Apr '13 - 2:28 
This is the C++/CLI forum; which are you using, C++/CLI or unmanaged C++?
Use the best guess

GeneralRe: Display only 2 digs in string in label.memberSøren Lyder Nielsen23 Apr '13 - 2:32 
I have no idea.
 
Thought I could get some help here ?
GeneralRe: Display only 2 digs in string in label.mvpRichard MacCutchan23 Apr '13 - 3:55 
Søren Lyder Nielsen wrote:
I have no idea.
Seriously? You are writing a program and you do not know what language or framework you are using? I don't know how you expect us to help if you cannot answer such a basic question. I would suggest you make a decision which language you plan to use and get hold of a book to learn the basics of it before trying anything else.
Use the best guess

GeneralRe: Display only 2 digs in string in label.memberSøren Lyder Nielsen23 Apr '13 - 4:42 
Thanks for the help.
 
But i gotta say, I feel it a is waste of time to try and get anything usefull out of you.
 
All I ask for, is that you write one line of code with my own data in C++. But instead i feel you blame me for not knowing anything, even though that was one of the first things i told you.
 
I will try my luck some other time.
GeneralRe: Display only 2 digs in string in label.mvpRichard MacCutchan23 Apr '13 - 4:49 
Søren Lyder Nielsen wrote:
All I ask for, is that you write one line of code with my own data in C++.
No, you have not asked that, you asked how to get a number formatted in a particular way in C++/CLI, and I referred you to the documentation that explains it in detail, with plenty of samples. It seems you are not prepared to spend the time reading it. You also do not seem to know exactly which language you are using, so I cannot answer the question, because it would be different for each language.
 
Søren Lyder Nielsen wrote:
But instead i feel you blame me for not knowing anything
Neither did I blame you for anything. I have done my best to help you but I cannot answer the question unless I get the proper facts to start with. As I said before, you need to decide which version of the language you are using and start studying it. Give us the proper facts and background to your problem and we will try to help, but you are expected to do some of the work for yourself.
Use the best guess

AnswerRe: Display only 2 digs in string in label.memberMember 1000269911 May '13 - 0:46 
1 - convert them to float type , example :
{
double a = 2.1589687489;
String^ b = Convert::ToString((float)a);
}
 

2 - remove them , example :
{
double a = 2.1589687489;
String^ b = Convert::ToString(a);
b = b->remove(b->IndexOf('.')+2 );
 
}
GeneralRe: Display only 2 digs in string in label.mvpRichard MacCutchan11 May '13 - 4:10 
There is no need to do that when you can use format strings to produce the required result in the first place.
Use the best guess

QuestionC++ Windows Form Application Printingmembereakteam16 Apr '13 - 10:37 
this is my code in windows form.... it compiles without error but it prints blank page.... where i done wrong?? please help...
 

#pragma endregion
        // Declare the PrintDocument object.

    private: System::Void Button1_Click_1(System::Object^  sender, System::EventArgs^  e) {
   PrintDialog1->AllowSomePages = true;
 
   PrintDialog1->ShowHelp = true;
 
   PrintDocument ^docToPrint = gcnew PrintDocument;
   PrintDialog1->Document = docToPrint;
   if ( docToPrint == nullptr )
         System::Windows::Forms::MessageBox::Show(  "null" );
 

 
   if ( PrintDialog1 == nullptr )
         System::Windows::Forms::MessageBox::Show(  "pnull" );
 

 
   System::Windows::Forms::DialogResult result = PrintDialog1->ShowDialog();
   System::Windows::Forms::MessageBox::Show( result.ToString() );
 

 
   if ( result == System::Windows::Forms::DialogResult::OK )
   {
       docToPrint->Print();
   }
 
             }
private: System::Void document_PrintPage_1(System::Object^  sender, System::Drawing::Printing::PrintPageEventArgs^  e) {
   String^ text = "In document_PrintPage method.";
   System::Drawing::Font^ printFont = gcnew System::Drawing::Font( "Times New Roman",20,System::Drawing::FontStyle::Bold );
 
   e->Graphics->DrawString("EAK TEAM TEST!!!",printFont,Brushes::Black,50,50);
   e->Graphics->DrawString( text, printFont, System::Drawing::Brushes::Black, 10, 10 );
         }

AnswerRe: C++ Windows Form Application PrintingmemberThePhantomUpvoter16 Apr '13 - 12:01 
You have already asked this in QA. Please do not cross post.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 24 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid