Zum Inhalt springen

saint3000

Mitglieder
  • Gesamte Inhalte

    1
  • Benutzer seit

  • Letzter Besuch

  1. Hallo an Alle... Ich starte in einem Modul einen Thread. Innerhalb des Threads möchte ich eine Änderung an der Form vornhemen. Die Aktualisierung klappt jedoch nicht. Hier der Quellcode: Zuerst die Form: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click StarteThread() End Sub End Class Hier das Modul: Imports System.Threading Module Module1 Delegate Sub DelegatedAktualisiereButtonText(ByVal strText As String) Public Sub StarteThread() Dim x As New Thread(AddressOf Hauptthread) x.Start() End Sub Private Sub Hauptthread() Dim s As New DelegatedAktualisiereButtonText(AddressOf AktualisiereButtonText) s.Invoke("TEST") End Sub Private Sub AktualisiereButtonText(ByVal strText As String) Form1.Button1.Text = strText End Sub End Module Wo liegt mein Fehler ??? Danke vorab....

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...