关闭窗口 [英] Close window

查看:76
本文介绍了关闭窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个弹出窗口(子窗口),可以通过我的主要窗口中的按钮调用它。[b $ b(父)窗口。 />
如何在父窗口之前设置子窗口不关闭?

我该怎么做?

-

使用VB.NET编程ASP.NET

感谢'(如果你试图帮助我)

希望这对你有所帮助(如果我试着帮助你)你好)

ruca

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

推荐答案

Ruca,


绑定OnClosing事件或覆盖表格''基类的OnClosing。

使用EventArgs,使用Cancel属性来阻止表单

结束。


Klaus


" ruca" < RU *** @ iol.pt> schrieb im Newsbeitrag

新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...
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" <ru***@iol.pt> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...


我有一个弹出(子)窗口,它在我的主窗口(父窗口)中被一个按钮调用。
如何设置子窗口以便不关闭之前父窗口?
我该怎么办?

-
用VB.NET编程ASP.NET
谢谢'(如果你试过帮助我)
希望这能帮助你(如果我试着帮助你)
ruca
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



Ruca,


绑定OnClosing事件或覆盖窗体'基类的OnClosing。

使用EventArgs,使用Cancel属性来阻止表单来自

收盘。


Klaus


" ruca" < RU *** @ iol.pt> schrieb im Newsbeitrag

新闻:%2 **************** @ TK2MSFTNGP11.phx.gbl ...
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" <ru***@iol.pt> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP11.phx.gbl...


我有一个弹出(子)窗口,它在我的主窗口(父窗口)中被一个按钮调用。
如何设置子窗口以便不关闭之前父窗口?
我该怎么办?

-
用VB.NET编程ASP.NET
谢谢'(如果你试过帮助我)
希望这能帮助你(如果我试着帮助你)
ruca
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






该事件不会出现在我的页面活动列表中。

我该怎么办?

我有另一个题。我如何一次只打开一个弹出窗口,即当我点击打开一个弹出窗口时,如果另一个打开则关闭。

我有一个功能但是只有当它被一个链接而不是一个按钮调用时才有效。


我在javascript中有这个

--- ------------------开始java代码--------------------------

var popup = null;


//如果打开,则销毁弹出窗口

函数DestroyWnd()

{

//关闭当前窗口

if(popup!= null)

{

popup.close( );

popup = null;

}

}


函数选择(Src)<如果((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",真);

}

其他

{

DestroyWnd();

选择(Src);

}

}

------------------- - 结束java代码--------------------------

在我的page_load中我有这个

---------------------开始vb代码----------------------- ---


Sub Page_Load(...)

...

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

...

End Sub


- --------------------结束vb代码--------------------------

-

使用VB.NET编程ASP.NET

感谢'(如果你试图帮助我)

希望这能帮助你(如果我试着帮助你的话)

ruca
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


这篇关于关闭窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆