Closing the form run by Application.Run

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Is it possible to close the form I invoked via
Application.Run() as I invoke another form without
the application exiting? (I'd rather not hide it
since I don't need it anymore)

....call to form:

Application.Run(new form1)


......from a button on form1:

dim f as new form2

form2.show
me.close


Thanks.
 
Tim said:
Is it possible to close the form I invoked via
Application.Run() as I invoke another form without
the application exiting? (I'd rather not hide it
since I don't need it anymore)

...call to form:

Application.Run(new form1)


.....from a button on form1:

dim f as new form2

form2.show
me.close


Thanks.

Sub Main:
f = new form1
f.show
application.run()

Call application.ExitThread to exit application.run.
 
Hello,

Tim Nelson said:
Application.Run( ) does not compile because it wants a
"frm" as a parameter.
Am I missing something here?

There is a parameterless overloaded version of 'Application.Run'. It works
perfectly on my .NET 1.0 machine. Which version of .NET do you use? Which
compilation error do you get?
 
Herfried,

C:\Documents and Settings\nelson\My Documents\Visual Studio
Projects\RFDDS\main.vb(32): Argument not specified for parameter 'fm' of
'Public Shared Sub Run(fm As System.Windows.Forms.Form)'.

I am using VS 2003 Pro using the .NET compact framework try to build
an application that runs on the Pocket PC.

Thanks.
 
Tim Nelson said:
Herfried,

C:\Documents and Settings\nelson\My Documents\Visual Studio
Projects\RFDDS\main.vb(32): Argument not specified for parameter 'fm'
of 'Public Shared Sub Run(fm As System.Windows.Forms.Form)'.

I am using VS 2003 Pro using the .NET compact framework try to
build an application that runs on the Pocket PC.


The docs for Application.Run say that only Application.Run(Form) is
supported.

BTW, there's also microsoft.public.dotnet.framework.compactframework
 
Hello,

Tim Nelson said:
C:\Documents and Settings\nelson\My Documents\Visual Studio
Projects\RFDDS\main.vb(32): Argument not specified for
parameter 'fm' of 'Public Shared Sub Run(fm As System.Windows.
Forms.Form)'.

I am using VS 2003 Pro using the .NET compact framework
try to build an application that runs on the Pocket PC.

It seems that the parameterless overload of 'Run' is not supported by the
Compact Framework.

Notice that you will have a better chance to get an answer if you post to
the .NET Compact Framework newsgroup in future:

news://msnews.microsoft.com/microsoft.public.dotnet.framework.compactframework

Web interface:

http://msdn.microsoft.com/newsgroup...soft.public.dotnet.framework.compactframework
 
Back
Top