Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hilfe zum Erstellen eines Threads in c++ .Net

Empfohlene Antworten

Veröffentlicht

Hallo alle zusammen,

ich habe folgendes Problem:

ich möchte einen Thread starten um etwas zu verschlüsseln das mache ich so:

public ref class Form1 : public System::Windows::Forms::Form

	{

void encryptText(Decimal a,Decimal  b, Decimal c)

...


private: System::Void Textver_Click(System::Object^  sender, System::EventArgs^  e) {



ThreadStart^ hthreadencrypt= gcnew ThreadStart(this ,&Crypt::Form1::encryptText(Schlüssel1->Value,Schlüssel2->Value,Schlüssel5->Value));

Thread^Threadencrypt=gcnew Thread(hthreadencrypt);

				Threadencrypt->Start();

		 }

Dazu gibt er mir folgenden Fehler:

error C2102: '&' erwartet L-Wert

error C3350: "System::Threading::ThreadStart": Ein Delegatkonstruktor erwartet 2 Argument(e).

Vielen Dank schon mal für die Antworten

lg valentin

Die Sache hat sich erledigt die Lösung ist wie folgt:

public ref class Form1 : public System::Windows::Forms::Form

	{

		void encryptText()

		{

			Decimal a=Schlüssel1->Value;Decimal b=Schlüssel2->Value;Decimal c=Schlüssel5->Value;

...

private: System::Void Textver_Click(System::Object^  sender, System::EventArgs^  e) {



			 ThreadStart^ ThreadDelegate= gcnew ThreadStart(this ,	&Crypt::Form1::encryptText);

				Thread^Threadencrypt=gcnew Thread(ThreadDelegate);

				Threadencrypt->Start();


Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.