Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2007, 01:39 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gmbalaa
Default disable the exit button in MDI form

disable the exit button that present at right top corner,i used to disable that by context menu property as false, it remove the icon of the MDI form too.

I do that without disable the icon of the form. any one know about this post your reply.

thanks in advance.
 
Old August 11th, 2007, 07:53 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gmbalaa
Default

When the user hit the exit button,It shows the message box like "Are you sure to exit" with yes/no option.

Code here,
==================
Private Sub Form2_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim a As Integer
a = MessageBox.Show("Are you sure to close", Text, MessageBoxButtons.YesNo)
If a = 6 Then
'Application.Run()
e.Cancel = False
Else
'Application.Exit()
e.Cancel = True
End If
End Sub
======================





Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying MDI Child Form Menus with MDI Parent ashu_from_india Pro VB 6 3 June 10th, 2008 11:01 PM
Controlling MDI child form from MDI parent panel LuxCoder VB.NET 2002/2003 Basics 7 April 11th, 2007 02:38 PM
Controlling MDI child form from MDI parent panel LuxCoder Visual Basic 2005 Basics 2 April 9th, 2007 03:24 PM
disable close button in mdi form nkramanmca VB How-To 4 January 6th, 2005 12:31 AM
how to disable a close button on VB form chanti VB How-To 2 September 30th, 2004 06:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.