Mark,
The normal way for this is declaring your form not gobaly
Private myForm as Form2
However forever in the procedure
dim myForm as New Form2
myForm.Show
And to see if it is still alive before that
if myForm.IsDisposed = false
I hope this helps,
Cor
"mark" <ma**@discussions.microsoft.com> schreef in bericht
news:3D**********************************@microsof t.com...
I think so
What I am looking for is a way to re-initialize an instance of form2,
resetting all of the controls (datagrids in particular) to that state they
were in when the instance was first created.
It appears that using form2.datagrid1.datasource=nothing is a very time
consuming task.
mark b
"I Don't Like Spam" wrote:
mark wrote: > Is there a way to create an instance of an object - say a windows
> form -
> from within a sub such that the object has class level scope?
>
>
>
>
not sure I understand the question. I think you are asking this:
Public Class MyClass
Dim F as Form
private sub DoSomething()
F = new MyForm
End Sub
End Class
Now F has class level scope.