S
ST
From Form1 I call a public sub in a module. The sub writes
on Form1.
Problem: the call creates a new Form1 and writes on it,
instead of writing on the one already shown Form1. I have
tried to avoid this by entering the following code at the
beginning of the sub:
Module Module1
Public MyForm As Form1
Public Sub Draw()
If MyForm Is Nothing Then
MyForm = New Form1
End If
MyForm.Show()
Apparently Form1 'is nothing' so a new one is created,,,by
why??
on Form1.
Problem: the call creates a new Form1 and writes on it,
instead of writing on the one already shown Form1. I have
tried to avoid this by entering the following code at the
beginning of the sub:
Module Module1
Public MyForm As Form1
Public Sub Draw()
If MyForm Is Nothing Then
MyForm = New Form1
End If
MyForm.Show()
Apparently Form1 'is nothing' so a new one is created,,,by
why??