By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,693 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,693 IT Pros & Developers. It's quick & easy.

Closing the form run by Application.Run

P: n/a
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.

Nov 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"Tim" <xn******@lycosmail.com> schrieb
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.

--
Armin

Nov 20 '05 #2

P: n/a
Hello,

"Tim" <xn******@lycosmail.com> schrieb:
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)


http://groups.google.de/groups?selm=...TNGP11.phx.gbl

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

P: n/a
Cor
Herfried,
This kind of questions are the speciality or Armin,
:-)
Cor
Nov 20 '05 #4

P: n/a

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Hello,

"Tim" <xn******@lycosmail.com> schrieb:
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)

http://groups.google.de/groups?selm=...TNGP11.phx.gbl
--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet

Application.Run( ) does not compile because it wants a "frm" as a
parameter.
Am I missing something here?
Thanks.
Nov 20 '05 #5

P: n/a
Hello,

"Tim Nelson" <ti***************@softhome.net> schrieb:
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 K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #6

P: n/a
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.

"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:Od**************@TK2MSFTNGP12.phx.gbl...
Hello,

"Tim Nelson" <ti***************@softhome.net> schrieb:
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 K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #7

P: n/a
Hello,

"Tim Nelson" <ti***************@softhome.net> schrieb:
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/microsof...mpactframework

Web interface:

http://msdn.microsoft.com/newsgroups...mpactframework

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #8

P: n/a
"Tim Nelson" <ti***************@softhome.net> schrieb
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
--
Armin

Nov 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.