Click here to Skip to main content
15,921,577 members
Home / Discussions / C#
   

C#

 
GeneralRe: dispaly non english from DB Pin
TAREQ F ABUZUHRI21-Dec-05 2:55
TAREQ F ABUZUHRI21-Dec-05 2:55 
QuestionWrite WebForm Variables to Word Pin
Dstayton20-Dec-05 7:47
Dstayton20-Dec-05 7:47 
QuestionTo Create Circular Directx Surface. Pin
ShettyRitheesh20-Dec-05 7:47
ShettyRitheesh20-Dec-05 7:47 
QuestionC# Question... Pin
QzRz20-Dec-05 5:56
QzRz20-Dec-05 5:56 
AnswerRe: C# Question... Pin
Guffa20-Dec-05 6:31
Guffa20-Dec-05 6:31 
AnswerNotification of form closing Pin
Sean Michael Murphy20-Dec-05 7:33
Sean Michael Murphy20-Dec-05 7:33 
GeneralRe: Notification of form closing Pin
QzRz20-Dec-05 7:38
QzRz20-Dec-05 7:38 
GeneralRe: Notification of form closing Pin
Sean Michael Murphy20-Dec-05 7:55
Sean Michael Murphy20-Dec-05 7:55 
QzRz wrote:
In the mainform (the first form) i have a few events
it has to run through when it close.

So it is in the first form I want to be notified when
form2 close.


Right, I understood that. The code in my earlier message goes into your "form1", we'll call it.

You have some event in form1 that causes form2 to be displayed (a button click, or a menu selection, or something). That action happens and form2 is created, the Closing event is wired to an event handler in form1 and finally form2 is displayed. The creation of form2, its event wiring and event handling code are all in form1.

When your user closes form2, by invoking a Hide() method, or setting form2.Visible = false, or by clicking on the Windows close button at the top right of the form, the fm2_Closing event handler in form1 will be invoked.

You can do whatever you need to do with the data collected by form2 in that event handler (probably some sort of data validation).

Dig? Share and enjoy.

Sean
GeneralRe: Notification of form closing Pin
QzRz23-Dec-05 8:47
QzRz23-Dec-05 8:47 
QuestionCasting an object to a double[] Pin
smurfy3420-Dec-05 5:54
smurfy3420-Dec-05 5:54 
AnswerRe: Casting an object to a double[] Pin
Judah Gabriel Himango20-Dec-05 7:19
sponsorJudah Gabriel Himango20-Dec-05 7:19 
GeneralRe: Casting an object to a double[] Pin
smurfy3420-Dec-05 7:45
smurfy3420-Dec-05 7:45 
GeneralRe: Casting an object to a double[] Pin
Judah Gabriel Himango20-Dec-05 8:20
sponsorJudah Gabriel Himango20-Dec-05 8:20 
GeneralRe: Casting an object to a double[] Pin
smurfy3420-Dec-05 16:43
smurfy3420-Dec-05 16:43 
QuestionCrystal Report - FIlter results Pin
chinky singh20-Dec-05 5:36
chinky singh20-Dec-05 5:36 
QuestionRetrieve Monitor Serial Number with wmi Pin
WetRivrRat20-Dec-05 5:33
WetRivrRat20-Dec-05 5:33 
QuestionMain menu docking Pin
VPMahank20-Dec-05 4:50
VPMahank20-Dec-05 4:50 
AnswerRe: Main menu docking Pin
Dan Neely20-Dec-05 5:48
Dan Neely20-Dec-05 5:48 
AnswerRe: Main menu docking Pin
Judah Gabriel Himango20-Dec-05 7:20
sponsorJudah Gabriel Himango20-Dec-05 7:20 
GeneralRe: Main menu docking Pin
VPMahank20-Dec-05 7:49
VPMahank20-Dec-05 7:49 
GeneralRe: Main menu docking Pin
Judah Gabriel Himango20-Dec-05 8:18
sponsorJudah Gabriel Himango20-Dec-05 8:18 
QuestionCut forms and buttons! Urgent please!! Pin
eyej20-Dec-05 4:27
eyej20-Dec-05 4:27 
AnswerRe: Cut forms and buttons! Urgent please!! Pin
albCode20-Dec-05 4:36
albCode20-Dec-05 4:36 
AnswerRe: Cut forms and buttons! Urgent please!! Pin
Curtis Schlak.20-Dec-05 4:45
Curtis Schlak.20-Dec-05 4:45 
AnswerRe: Cut forms and buttons! Urgent please!! Pin
eyej20-Dec-05 10:12
eyej20-Dec-05 10:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.