PC Review


Reply
Thread Tools Rate Thread

Close window

 
 
ruca
Guest
Posts: n/a
 
      5th Apr 2004
Hi,

I have a popup (child) window that it is called by a button in my main
(parent) window.
How can I set the child window for not closing before the parent window?
What do I have to do?


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


 
Reply With Quote
 
 
 
 
Klaus Löffelmann
Guest
Posts: n/a
 
      5th Apr 2004
Ruca,

bind the OnClosing event or overwrite OnClosing of the form's base class.
With the EventArgs, use the Cancel property to prevent the form from
closing.

Klaus

"ruca" <(E-Mail Removed)> schrieb im Newsbeitrag
news:%(E-Mail Removed)...
> Hi,
>
> I have a popup (child) window that it is called by a button in my main
> (parent) window.
> How can I set the child window for not closing before the parent window?
> What do I have to do?
>
>
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
>
>



 
Reply With Quote
 
ruca
Guest
Posts: n/a
 
      5th Apr 2004
Hi

that event don't appear in my list of page events.
What do I have to do?
I have another question. How can I open only one popup at a time, ie, when I
click to open one popup, if another is open this one closes.
I have a funtion but only works if it is called by an link and not a button.

I have this in JavaScript:
--------------------- begin java code--------------------------
var popup = null;

//destroy popup if aleady opened
function DestroyWnd ()
{
// close the current window
if(popup != null)
{
popup.close();
popup = null;
}
}

function pick(Src)
{
if((popup == null) || popup.closed)
{

var url = "xpto.aspx?srcA=" + Src
popup = window.open(url, "_blank", "height=200, width=200, left=250,
top=200, " +
"location=no, menubar=no, resizable=no, " +
"scrollbars=no, titlebar=no, toolbar=no", true);
}
else
{
DestroyWnd();
pick(Src);
}
}
--------------------- end java code--------------------------


In my page_load i Have this
--------------------- begin vb code--------------------------

Sub Page_Load(...)
...
Button1.Attributes.Add("OnClick","pick('textbox1');")
...
End Sub

--------------------- end vb code--------------------------


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      5th Apr 2004
Hi Ruca,

When you make a webform in his self container, the page is disconnected as
soon as you have showed it.

There are posibilities to prevent that from closing, I hope you are not
making such an terrible webform.

When you want what you ask, why than not just use a large label on your
form in a very different colour, the only problem is that the user cannot
move it. (Although with some Javascript and the style possitition absolute
that should be possible too)

Just my thought,

Cor



 
Reply With Quote
 
Klaus Löffelmann
Guest
Posts: n/a
 
      5th Apr 2004
Are you talking WinForms or ASP.NET - because that's different?
If ASP.NET, you're in the wrong group.
Make sure to not crosspost the next time.

Klaus

"Klaus Löffelmann" <(E-Mail Removed)> schrieb im Newsbeitrag
news:%(E-Mail Removed)...
> Ruca,
>
> bind the OnClosing event or overwrite OnClosing of the form's base class.
> With the EventArgs, use the Cancel property to prevent the form from
> closing.
>
> Klaus
>
> "ruca" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:%(E-Mail Removed)...
> > Hi,
> >
> > I have a popup (child) window that it is called by a button in my main
> > (parent) window.
> > How can I set the child window for not closing before the parent window?
> > What do I have to do?
> >
> >
> > --
> > Programming ASP.NET with VB.NET
> > Thank's (if you try to help me)
> > Hope this help you (if I try to help you)
> > ruca
> >
> >

>
>



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      5th Apr 2004
Hi Klaus,

Why is this the wrong group for VB.net development for webapplications, that
is normally done here?

There is no other international newsgroup for that.

I know that this is not as in the German newsgroups, but there is a
newsgroup entwickler.dotnet.asp)

I hope this makes it more clear?

Cor


 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      5th Apr 2004
Hi Klaus,

Rucca does vb.net webforms (I know this) but he has that too in the footer
from his message.

Cor


 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      5th Apr 2004
Hi Claus,

I saw I forgot to send this message (pusch the send button) an hour ago.

Sorry

:-)

Cor


 
Reply With Quote
 
Klaus Löffelmann
Guest
Posts: n/a
 
      5th Apr 2004
Cor,

you're absolutely right. Sorry for that.
I really thought, there was not only
microsoft.public.dotnet.framework.asp.net, but that group also seperated in
VB and C#.
(Why isn't that so, by the way, would make sense, wouldn't it?)

Klaus

"Cor" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> Hi Klaus,
>
> Why is this the wrong group for VB.net development for webapplications,

that
> is normally done here?
>
> There is no other international newsgroup for that.
>
> I know that this is not as in the German newsgroups, but there is a
> newsgroup entwickler.dotnet.asp)
>
> I hope this makes it more clear?
>
> Cor
>
>



 
Reply With Quote
 
Klaus Löffelmann
Guest
Posts: n/a
 
      5th Apr 2004
Cor,

funny, the whole thread is messed up... :-)
I just noticed, that I actually answered myself in the first branch.
I guess, I'm confused today. Should get more sleep.

Klaus

"Cor" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> Hi Claus,
>
> I saw I forgot to send this message (pusch the send button) an hour ago.
>
> Sorry
>
> :-)
>
> Cor
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close a New Window in Word; original window remains open M I K E Microsoft Word Document Management 2 7th Mar 2008 02:16 PM
popup window close to submit opener window without 'causes validation' happening Matt Jensen Microsoft ASP .NET 1 16th Dec 2005 03:16 PM
Pop Up windows close automatically and close all ie browser window =?Utf-8?B?Q3JhenlTaGl0?= Windows XP Internet Explorer 1 22nd Feb 2005 01:08 AM
Smart Client - Want to close the stub window when child window is closed Stone Microsoft Dot NET Framework Forms 0 28th Apr 2004 09:12 PM
Can Not window.close() to Close a New Window After Submitting to It Chan Windows XP Internet Explorer 0 8th Oct 2003 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:37 PM.