close

java swing, i want to close one JFrame without closing another, how can i get it ?

i have three JFrames, i want to close one of them without influence to another. what can i do to get it ? thanks Peter. I want to open two(or more) JFrames at the same time, and When I close one of them(use the default close button), others is still open. ...

Close all popup dialogs when main window closed in ASP.NET

In my web application a lot of popups opened from the parent window using 'window.open'. So I want to close all those popups when my application's main window is closed. How can I do that? ...

How would I go about performing an operation on closing a C# console application?

I'd like to save data from a console application in its final state when closed. I've figured out how to use serialization to save the data, but not how to make this happen when the application closes. One method is to set an unmanaged handler to intercept the close command and perform an operation, however once the event handler has b...

Why hibernate session.close() does not flushes the data automatically?

When hibernate closes a session, the purpose of close is basically to close the underlying connection and the clean up the first level cache. Why the flush also does not happens automatically here? ...

setting programatically closereason c#

Hello! I want to set the CloseReason of a form after I call This.Close() inside the form. Usually, this forms is closed by itself calling This.Close(), but I want to ask the user if they REALLY want to close the form, and send a mbox with some info. But I have this: protected override void OnFormClosing(FormClosingEventArgs e) { ...

How to close a TcpClient when the other end has been closed in .NET?

I have a class that handles TcpClients. What the class should do is: while the other end has not done a graceful close or we are stopping { receive a request process it send response } As I don't know when the other client will send a request I can not do a Read with a timeout set, so what I have un...

JQuery: Disable 'X' button in top-right of Dialog

Hello all, I'm trying to make a dialog that requires a user to agree to terms before continuing, and don't want to allow the user to just click the 'X' in the top right corner of the dialog to close. I'd like to require that the user click 'I agree'. Is there any way to disable the 'X' in the dialog? Thanks. Clarification: I'm just u...

C# Do I Need Socket.Close()?

i am studying asynchronous C# Sockets at the moment and i have noticed something that i am confused about. in all the End...(Accept/Connect) etc there is a code section like: Socket s = (Socket) ar.AsyncState; here it is being casted as a socket. as each End uses these local Sockets is there any point in trying to close() any of the...

Do I need "close FILEHANDLE" check for errors?

Hello, does the "or die $!"-part in the "close $fh or die $!;"-line any good? #!/usr/bin/env perl use warnings; use strict; my $file = 'my_file'; open my $fh, '<', $file or die $!; print <$fh>; close $fh or die $!; ...

How to close current tab in a browser window ?

I want to create a link on a webpage that close current active tab in a browser without closing other tabs in browser. When user click that close link a alert message should appear asking user to confirm with two buttons, "YES" and "NO". If user clicks "YES", close that page and If "NO", do nothing. How it will be done? Thanks ...

Form Dispose() or Close()

Hi everyone, I'm having 2 forms. From one form I created and shown the other form. It's working great. But when I try to close or Dispose that form from the form that created it I get following Exception: Exception : Value Dispose() cannot be called while doing CreateHandle(). Stack Trace : ======================== at System.Wi...

How to correctly free a PDO instance.

for example: $db = new PDO(); // some code using $db here // and next, i want to free this var and close all connection and so on $db = NULL; // or how correctly? Is that correct way to free all SQL results and connections? ...

CloseHandle():Return value check require

I am using CloseHandle() to close handle to a thread. This is done towards the end of the program and hence cleanup operation should be irrespective of the return value of the CloseHandle(); pc-lint reports error that , ignoring return value of function. Kindly let me know if there will be any issue if ignoring the return value ...

What disadvantages are there for leaving an SQL Connection open?

This seems to be a simple question, but I wonder the disadvantages of not calling the "close()" function. Thanks. ...

Socket close in java

I have a socket tcp connection between two java applications. When one side closes the socket the other side remains open. but I want it to be closed. And also I can't wait on it to see whether it is available or not and after that close it. I want some way to close it completely from one side. What can I do? ...

Java socket close timeout

In java when you close a socket it doesn't do anything anymore but it actually closes the tcp connection after a timeout time. I need thousands of sockets and I want them to be closed exactly after closed them not after wasting my time and my resources! What can I do? Thank you. ...

Excel process not ending in Cluster environment

When we try to close excel object, it fails to close to cluster environment. The same is working fine in QA and UAT environment. public bool KillExcelProcess() { try { object misValue = System.Reflection.Missing.Value; wbObj.Save(); wbObj.Close(true, misValue, misValue); ...

Correct Procedure for mysqlConnect

Hello, I am new to php syntax and am looking for advice on creating the most acceptable or correct code. I focus on front end design, but I like to make sure my code is proper. I am in a digital media program, my instructor has given us this code for connecting to our MYSQL databases. <?php mysql_connect("localhost", "root", "root")or d...

c# - action when form is closed

How to make as by pressing to the close button, make so that the form was not closed, and it was turned off? private void Form1_Closed(object sender, EventArgs e) { Form1.Hide(); } So the form is all the same closed Sorry for bad english. =) ...

Closing or Hiding forms causes a cross thread error

I am baffled by this simple task i do over and over again. I have an array of child forms. The array is initiated in another form's constructor: frmChildren = new ChildGUI[20]; When the user requests to see a child form, i do this: if (frmChildren[nb] == null) { frmChildren[nb] = new ChildGUI(); frmChildren[nb].MdiParent = ...