Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,in a dialog based application, how we can write the code for action that should happen while clicking the close button of dialog.its a user drawn dialog and its a child dialog.how can i close my child dialog by a click of close button of child dialog.what should be the code to do this?And also, how can i close one dialog from another dialog?please help me...
thanks you in advance.
Posted
Updated 30-Jun-11 23:40pm
v4

OnClose helps.
Refer to Creating a Dialog-based App[^]
 
Share this answer
 
Comments
Jijesh Balakrishnan 1-Jul-11 5:03am    
my dialog is a user drawn dialog.i want to close that particular dialog box while clicking the close button.what should be the code for closing a dialog?
Not sure this matters...
Jijesh Balakrishnan wrote:
its a user drawn dialog and its a child dialog.


If you've derived the dialog from CDialog and you want to do something unique before closing a dialog, override the virtual OnDestroy(). If you'd like to close one dialog from another, just call OnDestroy() on that window.
 
Share this answer
 
Use this

VB
If MsgBox("Your Message ", MsgBoxStyle.YesNoCancel) = MsgBoxResult.No Then
            ' -----
            ' -----

            'Your action goes here
            ' -----
            ' -----
        End If



May this help you !
 
Share this answer
 
Comments
Jijesh Balakrishnan 1-Jul-11 5:12am    
its not a message window.it is the dialog of a dialog based application

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900