Ich wollte fragen ob mir jemand hier Tipps / Helfen könnte da ich folgendes Problem habe.
Ich will mit Visual Basic C++ 2008 ( Benutzeroberfläche ) den IO-Warrior einbinden, damit die Anwendung auf den IO-Warrior zugreifft und von dort aus auf ein IC Daten abruft / wiedergibt.
Ich habe seit Montag noch nichts gutes gefunden ( hier im Forum und auch Google allgemein ) wo mir zeigt wie ich das von A-Z machen kann.
Ich hab mal den Quelltext von der Form1 hier reinkopiert.
#pragma once
#include "Form2.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;
namespace Projekt1 {
/// <summary>
/// Zusammenfassung für Form1
///
/// Warnung: Wenn Sie den Namen dieser Klasse ändern, müssen Sie auch
/// die Ressourcendateiname-Eigenschaft für das Tool zur Kompilierung verwalteter Ressourcen ändern,
/// das allen RESX-Dateien zugewiesen ist, von denen diese Klasse abhängt.
/// Anderenfalls können die Designer nicht korrekt mit den lokalisierten Ressourcen
/// arbeiten, die diesem Formular zugewiesen sind.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Konstruktorcode hier hinzufügen.
//
}
protected:
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
protected:
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::Button^ button3;
private: System::Windows::Forms::Button^ button4;
private: System::Windows::Forms::Button^ button5;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::RadioButton^ radioButton1;
private: System::Windows::Forms::RadioButton^ radioButton2;
private: System::Windows::Forms::GroupBox^ groupBox1;
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
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)
{
this->button1 = (gcnew System::Windows::Forms::Button());
this->button2 = (gcnew System::Windows::Forms::Button());
this->button3 = (gcnew System::Windows::Forms::Button());
this->button4 = (gcnew System::Windows::Forms::Button());
this->button5 = (gcnew System::Windows::Forms::Button());
this->label1 = (gcnew System::Windows::Forms::Label());
this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->groupBox1->SuspendLayout();
this->SuspendLayout();
//
// button1
//
this->button1->Location = System::Drawing::Point(110, 327);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(196, 45);
this->button1->TabIndex = 0;
this->button1->Text = L"Sonderfunktionen";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// button2
//
this->button2->Location = System::Drawing::Point(110, 378);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(196, 42);
this->button2->TabIndex = 1;
this->button2->Text = L"Einstellungen";
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
//
// button3
//
this->button3->Location = System::Drawing::Point(110, 426);
this->button3->Name = L"button3";
this->button3->Size = System::Drawing::Size(196, 40);
this->button3->TabIndex = 2;
this->button3->Text = L"Beenden";
this->button3->UseVisualStyleBackColor = true;
this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
//
// button4
//
this->button4->Location = System::Drawing::Point(88, 130);
this->button4->Name = L"button4";
this->button4->Size = System::Drawing::Size(98, 103);
this->button4->TabIndex = 3;
this->button4->Text = L"Bart";
this->button4->UseVisualStyleBackColor = true;
//
// button5
//
this->button5->Location = System::Drawing::Point(248, 130);
this->button5->Name = L"button5";
this->button5->Size = System::Drawing::Size(97, 102);
this->button5->TabIndex = 4;
this->button5->Text = L"Lisa";
this->button5->UseVisualStyleBackColor = true;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label1->Location = System::Drawing::Point(129, 9);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(165, 20);
this->label1->TabIndex = 5;
this->label1->Text = L"Auswahl Textansagen";
//
// radioButton1
//
this->radioButton1->AutoSize = true;
this->radioButton1->Location = System::Drawing::Point(0, 27);
this->radioButton1->Name = L"radioButton1";
this->radioButton1->Size = System::Drawing::Size(77, 17);
this->radioButton1->TabIndex = 6;
this->radioButton1->TabStop = true;
this->radioButton1->Text = L"Binär-Code";
this->radioButton1->UseVisualStyleBackColor = true;
//
// radioButton2
//
this->radioButton2->AutoSize = true;
this->radioButton2->Location = System::Drawing::Point(180, 27);
this->radioButton2->Name = L"radioButton2";
this->radioButton2->Size = System::Drawing::Size(75, 17);
this->radioButton2->TabIndex = 7;
this->radioButton2->TabStop = true;
this->radioButton2->Text = L"Gray-Code";
this->radioButton2->UseVisualStyleBackColor = true;
//
// groupBox1
//
this->groupBox1->Controls->Add(this->radioButton2);
this->groupBox1->Controls->Add(this->radioButton1);
this->groupBox1->Location = System::Drawing::Point(74, 239);
this->groupBox1->Name = L"groupBox1";
this->groupBox1->Size = System::Drawing::Size(271, 68);
this->groupBox1->TabIndex = 8;
this->groupBox1->TabStop = false;
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(248, 76);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Drawing::Size(97, 20);
this->textBox1->TabIndex = 9;
//
// textBox2
//
this->textBox2->Location = System::Drawing::Point(88, 76);
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(98, 20);
this->textBox2->TabIndex = 10;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(47, 79);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(29, 13);
this->label2->TabIndex = 11;
this->label2->Text = L"Start";
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(210, 79);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(32, 13);
this->label3->TabIndex = 12;
this->label3->Text = L"Ende";
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(417, 478);
this->Controls->Add(this->label3);
this->Controls->Add(this->label2);
this->Controls->Add(this->textBox2);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->groupBox1);
this->Controls->Add(this->label1);
this->Controls->Add(this->button5);
this->Controls->Add(this->button4);
this->Controls->Add(this->button3);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->MaximizeBox = false;
this->Name = L"Form1";
this->Text = L"Form1";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->groupBox1->ResumeLayout(false);
this->groupBox1->PerformLayout();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
this->Hide();
Form2^ form2=gcnew Form2();
form2->ShowDialog();
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
this->Close();
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
}
};
}
Könnten Sie mir vllt weiterhelfen und mir sagen ob das … :
A ) … einbinden in diese VB Version geht ?
B ) ... was ich genau machen muss, damit das Programm darauf zugreifft ?
Es handelt sich um den IO-Warrior 24
Lg Oliver