So simple

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

Hey Group,

Sorry to ask such a simple quwation but how do i close a form which has been
called from another.

E.G:- form1 uses:

Dim LoadModifyTablesArcirs As frmModifyArcirisRoles
LoadModifyTablesArcirs = New frmModifyArcirisRoles()
LoadModifyTablesArcirs.ShowDialog()

How do I then close frmModifyTablesArciris?

Many Thanks
MCN
 
MadCrazyNewbie said:
Hey Group,

Sorry to ask such a simple quwation but how do i close a form which
has been called from another.

E.G:- form1 uses:

Dim LoadModifyTablesArcirs As frmModifyArcirisRoles
LoadModifyTablesArcirs = New frmModifyArcirisRoles()
LoadModifyTablesArcirs.ShowDialog()

How do I then close frmModifyTablesArciris?


LoadModifyTablesArcirs.Close


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Thats what I thought but i get a error saying:

Name LoadModifyTablesArcirs is not declared

if i use:

CloseModifyTablesArcirs As frmModifyTablesArcirs

I get a message saying:

An unhandled exception of type 'System.NullReferenceException' occurred in
Excellence.NET.exe
Additional information: Object reference not set to an instance of an
object.

Cheers
MCN
 
MadCrazyNewbie said:
Thats what I thought but i get a error saying:

Name LoadModifyTablesArcirs is not declared

if i use:

CloseModifyTablesArcirs As frmModifyTablesArcirs

I get a message saying:

An unhandled exception of type 'System.NullReferenceException'
occurred in Excellence.NET.exe
Additional information: Object reference not set to an instance of
an object.

If you don't have a reference to the existing Form, you must pass the
reference to the object that needs it.


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Hi Simon

A lot of messages to day from me to you.
Dim LoadModifyTablesArcirs As frmModifyArcirisRoles
LoadModifyTablesArcirs = New frmModifyArcirisRoles()
LoadModifyTablesArcirs.ShowDialog()
Direct after this when you do not get a value
LoadModifyTablesArcirs.dispose()

One of the rare places where disposed should be used, when you do not want
to show it again.

Cor
 
Back
Top