Windows verbietet die Installation von meiner .exe



  • #include "MyForm.h"
    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;
    
    [STAThreadAttribute]
    int main(array<System::String ^> ^args)
    {
    	Application::EnableVisualStyles();
    	Application::SetCompatibleTextRenderingDefault(false);
    	SourceMW::MyForm mainForm;
    	Application::Run(%mainForm);
    
    	return 0;
    }
    
    
    
    
    
    
    #pragma once
    
    namespace SourceMW {
    
    	using namespace System;
    	using namespace System::ComponentModel;
    	using namespace System::Collections;
    	using namespace System::Windows::Forms;
    	using namespace System::Data;
    	using namespace System::Drawing;
    
    	/// <summary>
    	/// Zusammenfassung für MyForm
    	/// </summary>
    	public ref class MyForm : public System::Windows::Forms::Form
    	{
    	public:
    		MyForm(void)
    		{
    			InitializeComponent();
    			//
    			//TODO: Konstruktorcode hier hinzufügen.
    			//
    		}
    
    	protected:
    		/// <summary>
    		/// Verwendete Ressourcen bereinigen.
    		/// </summary>
    		~MyForm()
    		{
    			if (components)
    			{
    				delete components;
    			}
    		}
    
    	protected:
    	private: System::Windows::Forms::Button^  button2;
    	private: System::Windows::Forms::Label^  label1;
    	private: System::Windows::Forms::Label^  label2;
    	private: System::Windows::Forms::TextBox^  textBox1;
    	private: System::Windows::Forms::Button^  button1;
    
    	private:
    		/// <summary>
    		/// Erforderliche Designervariable.
    		/// </summary>
    		System::ComponentModel::Container ^components;
    
    #pragma region Windows Form Designer generated code
    		/// <summary>
    		/// Erforderliche Methode für die Designerunterstützung.
    		/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
    		/// </summary>
    		void InitializeComponent(void)
    		{
    			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(MyForm::typeid));
    			this->button2 = (gcnew System::Windows::Forms::Button());
    			this->label1 = (gcnew System::Windows::Forms::Label());
    			this->label2 = (gcnew System::Windows::Forms::Label());
    			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
    			this->button1 = (gcnew System::Windows::Forms::Button());
    			this->SuspendLayout();
    			// 
    			// button2
    			// 
    			this->button2->Location = System::Drawing::Point(395, 218);
    			this->button2->Name = L"button2";
    			this->button2->Size = System::Drawing::Size(75, 23);
    			this->button2->TabIndex = 1;
    			this->button2->Text = L"Close";
    			this->button2->UseVisualStyleBackColor = true;
    			// 
    			// label1
    			// 
    			this->label1->AutoSize = true;
    			this->label1->BackColor = System::Drawing::SystemColors::ControlLightLight;
    			this->label1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"label1.Image")));
    			this->label1->Location = System::Drawing::Point(9, 224);
    			this->label1->Name = L"label1";
    			this->label1->Size = System::Drawing::Size(168, 17);
    			this->label1->TabIndex = 2;
    			this->label1->Text = L"Alle Rechte gehöhren Mir";
    			// 
    			// label2
    			// 
    			this->label2->AutoSize = true;
    			this->label2->ForeColor = System::Drawing::SystemColors::ControlLightLight;
    			this->label2->Location = System::Drawing::Point(12, 9);
    			this->label2->Name = L"label2";
    			this->label2->Size = System::Drawing::Size(12, 17);
    			this->label2->TabIndex = 3;
    			this->label2->Text = L" ";
    			// 
    			// textBox1
    			// 
    			this->textBox1->Location = System::Drawing::Point(15, 46);
    			this->textBox1->Name = L"textBox1";
    			this->textBox1->Size = System::Drawing::Size(458, 22);
    			this->textBox1->TabIndex = 4;
    			// 
    			// button1
    			// 
    			this->button1->BackColor = System::Drawing::SystemColors::ActiveCaptionText;
    			this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12.8F));
    			this->button1->ForeColor = System::Drawing::SystemColors::ControlLightLight;
    			this->button1->Location = System::Drawing::Point(12, 102);
    			this->button1->Name = L"button1";
    			this->button1->Size = System::Drawing::Size(119, 44);
    			this->button1->TabIndex = 5;
    			this->button1->Text = L"Start";
    			this->button1->UseVisualStyleBackColor = false;
    			this->button1->Click += gcnew System::EventHandler(this, &MyForm::button1_Click_1);
    			// 
    			// MyForm
    			// 
    			this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
    			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
    			this->BackColor = System::Drawing::SystemColors::InfoText;
    			this->ClientSize = System::Drawing::Size(482, 253);
    			this->Controls->Add(this->button1);
    			this->Controls->Add(this->textBox1);
    			this->Controls->Add(this->label2);
    			this->Controls->Add(this->label1);
    			this->Controls->Add(this->button2);
    			this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
    			this->Name = L"MyForm";
    			this->Text = L"SourceMW";
    			this->Load += gcnew System::EventHandler(this, &MyForm::MyForm_Load);
    			this->ResumeLayout(false);
    			this->PerformLayout();
    
    		}
    #pragma endregion
    
    private: System::Void button1_Click_1(System::Object^  sender, System::EventArgs^  e) {
    
    	label2->Text = textBox1->Text;
    
    }
    private: System::Void MyForm_Load(System::Object^  sender, System::EventArgs^  e) {
    }
    };
    }
    
    


  • Das ist der Code. Bin ja Anfänger und deswegen steht da nicht so viel. Aber jeder der diese exe runterladen will, egal ob auf Discord oder file uploader , kommen die meldungen



  • @NewMarvin sagte in Windows verbietet die Installation von meiner .exe:

    Aber jeder der diese exe runterladen will, egal ob auf Discord oder file uploader ,

    Jeder nicht. Denn ich konnte die Datei herunterladen und hochladen. Aber das nur am Rande. Der Code steht jetzt ja da.



  • @lemon03 Kommt bei Ihnen keine Meldung, nicht mal im Browser?



  • Dieser Beitrag wurde gelöscht!


  • Ich lerne zurzeit alles mit diesen Buch:
    https://www.bilder-upload.eu/bild-98d3ce-1542658351.jpg.html



  • Ist Dein Code nicht C#?



  • ö.ö ne egtl C++ xD Habe es in diesen Format erstellt : c++ empty CLR Windows Form



  • @NewMarvin sagte in Windows verbietet die Installation von meiner .exe:

    ö.ö ne egtl C++ xD Habe es in diesen Format erstellt : c++ empty CLR Windows Form

    Dann ist es kein C++ 😉 sonder die C++ extension zu .Net. Die AFAIK meist genutzt wird um zwischen .Net und native code zu vermitteln



  • gibt es eine andere Möglichkeit in reinen c++ zu schreiben um ein Fenster zu erstellen? in Visual Studio


  • Mod

    Natürlich! Hast Du Dich überrhaupt mal mit den verschiedenen Möglichkeiten und Projketen in VC auseinandergesetzt?

    Windows API.. MFC...




Anmelden zum Antworten