Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,095 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,627 people online right now. Registration is fast and FREE... Join Now!




Why wont this copy!

 
Reply to this topicStart new topic

Why wont this copy!, pissing me off

pspfreak101
3 Oct, 2007 - 03:02 PM
Post #1

New D.I.C Head
*

Joined: 28 Jul, 2007
Posts: 29


My Contributions
Just started with C++ got sick of the .net framework for C# so decided to port my program to C++ any ways I found the example on the online help and it doesn't work mad.gif heres my code

CODE
#pragma once
#using <mscorlib.dll>
namespace EasyInstaller {
    
    using namespace System;
    using namespace System::IO;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;

    /// <summary>
    /// Summary for Form1
    ///
    /// WARNING: If you change the name of this class, you will need to change the
    ///          'Resource File Name' property for the managed resource compiler tool
    ///          associated with all .resx files this class depends on.  Otherwise,
    ///          the designers will not be able to interact properly with localized
    ///          resources associated with this form.
    /// </summary>
    public ref class Form1 : public System::Windows::Forms::Form
    {
    public:
        Form1(void)
        {
            InitializeComponent();
            //
            //TODO: Add the constructor code here
            //
        }

    protected:
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        ~Form1()
        {
            if (components)
            {
                delete components;
            }
        }
    private: System::Windows::Forms::Button^  Exit;
    private: System::Windows::Forms::Button^  Install;
    private: System::Windows::Forms::RadioButton^  radioButton1;
    private: System::Windows::Forms::CheckBox^  checkBox1;
    private: System::Windows::Forms::Label^  label1;
    private: System::Windows::Forms::Label^  label2;
    private: System::Windows::Forms::Label^  label3;
    private: System::Windows::Forms::RadioButton^  radioButton2;
    protected:
  

    private:
        /// <summary>
        /// Required designer variable.
        /// </summary>
        System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        void InitializeComponent(void)
        {
            this->Exit = (gcnew System::Windows::Forms::Button());
            this->Install = (gcnew System::Windows::Forms::Button());
            this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
            this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
            this->label1 = (gcnew System::Windows::Forms::Label());
            this->label2 = (gcnew System::Windows::Forms::Label());
            this->label3 = (gcnew System::Windows::Forms::Label());
            this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
            this->SuspendLayout();
            //
            // Exit
            //
            this->Exit->Location = System::Drawing::Point(163, 463);
            this->Exit->Name = L"Exit";
            this->Exit->Size = System::Drawing::Size(75, 23);
            this->Exit->TabIndex = 0;
            this->Exit->Text = L"Exit";
            this->Exit->UseVisualStyleBackColor = true;
            this->Exit->Click += gcnew System::EventHandler(this, &Form1::Exit_Click);
            //
            // Install
            //
            this->Install->Location = System::Drawing::Point(56, 463);
            this->Install->Name = L"Install";
            this->Install->Size = System::Drawing::Size(75, 23);
            this->Install->TabIndex = 1;
            this->Install->Text = L"Install";
            this->Install->UseVisualStyleBackColor = true;
            this->Install->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
            //
            // radioButton1
            //
            this->radioButton1->AutoSize = true;
            this->radioButton1->Location = System::Drawing::Point(46, 217);
            this->radioButton1->Name = L"radioButton1";
            this->radioButton1->Size = System::Drawing::Size(85, 17);
            this->radioButton1->TabIndex = 2;
            this->radioButton1->TabStop = true;
            this->radioButton1->Text = L"3.52 M33 - 4";
            this->radioButton1->UseVisualStyleBackColor = true;
            //
            // checkBox1
            //
            this->checkBox1->AutoSize = true;
            this->checkBox1->Location = System::Drawing::Point(46, 143);
            this->checkBox1->Name = L"checkBox1";
            this->checkBox1->Size = System::Drawing::Size(88, 17);
            this->checkBox1->TabIndex = 3;
            this->checkBox1->Text = L"Fw 3.71 M33";
            this->checkBox1->UseVisualStyleBackColor = true;
            //
            // label1
            //
            this->label1->AutoSize = true;
            this->label1->Location = System::Drawing::Point(12, 115);
            this->label1->Name = L"label1";
            this->label1->Size = System::Drawing::Size(79, 13);
            this->label1->TabIndex = 4;
            this->label1->Text = L"Install Firmware";
            //
            // label2
            //
            this->label2->AutoSize = true;
            this->label2->Location = System::Drawing::Point(12, 189);
            this->label2->Name = L"label2";
            this->label2->Size = System::Drawing::Size(74, 13);
            this->label2->TabIndex = 5;
            this->label2->Text = L"Your Firmware";
            //
            // label3
            //
            this->label3->AutoSize = true;
            this->label3->Location = System::Drawing::Point(15, 273);
            this->label3->Name = L"label3";
            this->label3->Size = System::Drawing::Size(103, 13);
            this->label3->TabIndex = 6;
            this->label3->Text = L"Install M33 update 4";
            //
            // radioButton2
            //
            this->radioButton2->AutoSize = true;
            this->radioButton2->Location = System::Drawing::Point(46, 306);
            this->radioButton2->Name = L"radioButton2";
            this->radioButton2->Size = System::Drawing::Size(93, 17);
            this->radioButton2->TabIndex = 7;
            this->radioButton2->TabStop = true;
            this->radioButton2->Text = L"M33 Update 4";
            this->radioButton2->UseVisualStyleBackColor = true;
            //
            // Form1
            //
            this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->ClientSize = System::Drawing::Size(293, 503);
            this->Controls->Add(this->radioButton2);
            this->Controls->Add(this->label3);
            this->Controls->Add(this->label2);
            this->Controls->Add(this->label1);
            this->Controls->Add(this->checkBox1);
            this->Controls->Add(this->radioButton1);
            this->Controls->Add(this->Install);
            this->Controls->Add(this->Exit);
            this->Name = L"Form1";
            this->Text = L"M33 Easy installer";
            this->ResumeLayout(false);
            this->PerformLayout();

        }
#pragma endregion
    private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
                
                 if (this->checkBox1->Checked)
             {
                  String* path = S"EBOOT.PBP";
                  String* path1 =  S"C:\EBOOT.PBP";

                   File::Copy(path, path1);

                 MessageBox::Show("Install Complete", "Complete", MessageBoxButtons::oK, MessageBoxIcon::Exclamation);
             }
        
                if (this->radioButton1->Checked)
                {
                    MessageBox::Show("You selected Fw 3.52");
                }
             };
            
    
            
    private: System::Void Exit_Click(System::Object^  sender, System::EventArgs^  e) {
             Close();
             }
    };
}


This post has been edited by pspfreak101: 3 Oct, 2007 - 03:04 PM
User is offlineProfile CardPM
+Quote Post

jjhaag
RE: Why Wont This Copy!
3 Oct, 2007 - 03:13 PM
Post #2

me editor am smartastic
Group Icon

Joined: 18 Sep, 2007
Posts: 1,789



Thanked: 2 times
Dream Kudos: 775
Expert In: C,C++

My Contributions
exactly what is the problem? the help will probably be more useful and more plentiful if you are more specific with your issues.

-jjh
User is offlineProfile CardPM
+Quote Post

pspfreak101
RE: Why Wont This Copy!
3 Oct, 2007 - 03:24 PM
Post #3

New D.I.C Head
*

Joined: 28 Jul, 2007
Posts: 29


My Contributions
Well It doesn't even run I get an error
CODE
1>------ Build started: Project: Easy Installer, Configuration: Debug Win32 ------
1>Compiling...
1>Easy Installer.cpp
1>c:\users\roberts\desktop\project\easy installer\easy installer\Form1.h(181) : error C3921: Use of S-prefixed strings requires /clr:oldSyntax command line option
1>        When compiling with /clr, an implicit conversion exists from string literal type to System::String^. If necessary to avoid ambiguity, cast to System::String^
1>c:\users\roberts\desktop\project\easy installer\easy installer\Form1.h(182) : error C3921: Use of S-prefixed strings requires /clr:oldSyntax command line option
1>        When compiling with /clr, an implicit conversion exists from string literal type to System::String^. If necessary to avoid ambiguity, cast to System::String^
1>c:\users\roberts\desktop\project\easy installer\easy installer\Form1.h(182) : warning C4129: 'E' : unrecognized character escape sequence
1>c:\users\roberts\desktop\project\easy installer\easy installer\Form1.h(181) : error C3699: '*' : cannot use this indirection on type 'System::String'
1>        compiler replacing '*' with '^' to continue parsing
1>c:\users\roberts\desktop\project\easy installer\easy installer\Form1.h(182) : error C3699: '*' : cannot use this indirection on type 'System::String'
1>        compiler replacing '*' with '^' to continue parsing
1>Build log was saved at "file://c:\Users\Roberts\Desktop\project\Easy Installer\Easy Installer\Debug\BuildLog.htm"
1>Easy Installer - 4 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 08:34PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month