Open/close window

yfng

Member
Joined
Feb 23, 2005
Messages
13
Programming Experience
Beginner
In VB.NET, is there any function similar to window.open or window.close in Javascript which can open/close new windows?

Thanks.
 

shelly121

Member
Joined
Feb 17, 2005
Messages
15
Programming Experience
Beginner
yfng said:
In VB.NET, is there any function similar to window.open or window.close in Javascript which can open/close new windows?

Thanks.
you can open and close forms??is that what you mean?
 

yfng

Member
Joined
Feb 23, 2005
Messages
13
Programming Experience
Beginner
Yes, currently I use the button.attributes.add("onclick", "javascript:window.close()") to close web forms. But the effect is not good as expected. Is there any function to close/open web forms in VB.NET?

Thanks.
 

shelly121

Member
Joined
Feb 17, 2005
Messages
15
Programming Experience
Beginner
yfng said:
Yes, currently I use the button.attributes.add("onclick", "javascript:window.close()") to close web forms. But the effect is not good as expected. Is there any function to close/open web forms in VB.NET?

Thanks.
wel you can make their visible property to false, and then to show them you could use the code:
Dim frmNewApp As New Form2()

frmNewApp.MdiParent =
Me

frmNewApp.Show()

and to close
me.close()
them r the only ways i know, or heres a website that mit be helpful perhaps??:
http://www.codeproject.com/vb/net/Simple_Singleton_Forms.asp
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
yfng is most likely asking about webForms.
As far as I know, there is no function in the .NET framework that can open and close browser windows. The reason is browser security.
 

yfng

Member
Joined
Feb 23, 2005
Messages
13
Programming Experience
Beginner
Thank you very much.
^^

Paszt said:
yfng is most likely asking about webForms.
As far as I know, there is no function in the .NET framework that can open and close browser windows. The reason is browser security.
 
Top Bottom