Also bei FormA habe ich das jetzt so gemacht:
Meintest Du das so ?
Code:
Option Explicit On
Option Strict On
Public Class FormA
Dim b As FormB
Dim guthaben, wert As Integer
Public Sub guthabenSenken(ByRef wert As Integer)
guthaben = guthaben - wert
End Sub
Public Sub überweisen(ByRef formB As FormB)
b = formB
b.guthabenErhoehen(10)
guthabenSenken(10)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Geld.Text = CStr(wert)
Waehrung.Text = CStr(guthaben)
FormB.Geld.Text = CStr(wert)
FormB.Währung.Text = CStr(guthaben)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormB.Show()
End Sub
Private Sub FormA_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Meintest Du das so ?