Public Class frmLocalScope
  Inherits System.Windows.Forms.Form
  Dim MyVariable As Integer     ' zmienna modułowa

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As _
             System.EventArgs) Handles MyBase.Load
  End Sub

  Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As _
             System.EventArgs) Handles btnCalc.Click
    MyVariable = 20
  End Sub

  Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As _
             System.EventArgs) Handles btnExit.Click
    MyVariable = 20
    Me.Dispose()
  End Sub
End Class
