Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Can Gökmen
  Where is Can Gökmen?
 Istanbul
 Turkey
 Can Gökmen
 To: mk sharma
  Where is mk sharma?
 mumbai
 India
 mk sharma
 Tags
Subject: RE: Form doesn't return to Menu
Thread ID: 345125 Message ID: 345294 # Views: 35 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: VFP and .NET
Date: Tuesday, May 22, 2012 10:12:13 AM         
   


> > Hi,
> > I have following app structure. Wenn I click bar1, form1 shows OK. Wenn I click Close button on the form I want the control goes back to the menu, so I can click another menu item. However, something is missing in the structure. Can someone help me? Thanks.
>
>
> * main1.prg
> *--------------------------
> ON SHUTDOWN CLEAR EVENTS
> DO menu1
> READ EVENTS
> ENDPROC
> 
> PROCEDURE menu1
> ****
> SET SYSMENU TO _MFILE, _MEDIT, _MWINDOW
> DEFINE PAD pad1 OF _MSYSMENU PROMPT "Pad1" BEFORE _mfile 
> ON PAD pad1 OF _MSYSMENU ACTIVATE POPUP pop1
> DEFINE POPUP pop1 MARGIN RELATIVE
> DEFINE BAR 1 OF pop1 PROMPT "Bar1"
> ON SELECTION BAR 1 OF pop1 DO bar1
> DEFINE BAR 2 OF pop1 PROMPT "Bar2"
> ON SELECTION BAR 2 OF pop1 DO bar2
> DEFINE PAD padExit OF _MSYSMENU PROMPT "Exit" BEFORE _mfile 
> ON SELECTION PAD padExit OF _MSYSMENU DO Exit1
> ENDPROC
> *********************************
> PROCEDURE bar1
> lobar1 = NEWOBJECT("frmbar1")
> lobar1.SHOW(1)
> RETURN
> 
> DEFINE CLASS frmbar1 AS FORM
>    CAPTION = "Bar1"
>    AUTOCENTER = .T.
>    PROCEDURE LOAD
>    RETURN
>    ENDPROC
>    ADD OBJECT ClsBtn AS COMMANDBUTTON WITH ;
>    NAME = "ClsBtn", ;
>    CAPTION = "Close It", ;
>    HEIGHT = 25
>    PROCEDURE ClsBtn.CLICK
>    THISFORM.RELEASE
>    ENDPROC
> ENDDEFINE
> ENDPROC
> *************************************
> PROCEDURE bar2
> RETURN
> ENDPROC
> *************************************
> PROCEDURE Exit1
> CLEAR EVENTS
> RETURN
> ENDPROC
> *****************************
> 

>
> Warm Regards,
> mk.

Hi Sharma,
I ran your example. However, I couldn't use it fully. Today, I saw the CB's version, which made me understand the basics of the menu system. if I knew that before yours would be also OK for me. Thanks so much for your efforts.
Regards,
Can

ENTIRE THREAD

Form doesn't return to Menu Posted by Can Gökmen @ 5/18/2012 4:22:26 PM
RE: Form doesn't return to Menu Posted by mk sharma @ 5/19/2012 4:13:05 AM
RE: Form doesn't return to Menu Posted by Can Gökmen @ 5/22/2012 10:12:13 AM
RE: Form doesn't return to Menu Posted by Stefan Wuebbe @ 5/20/2012 11:20:02 AM
RE: Form doesn't return to Menu Posted by Can Gökmen @ 5/22/2012 9:57:50 AM
RE: Form doesn't return to Menu Posted by Stefan Wuebbe @ 5/22/2012 8:21:01 PM
RE: Form doesn't return to Menu Posted by Cetin Basoz @ 5/20/2012 3:53:12 PM
RE: Form doesn't return to Menu Posted by Can Gökmen @ 5/22/2012 10:20:15 AM
RE: Form doesn't return to Menu Posted by Cetin Basoz @ 5/22/2012 1:59:45 PM
RE: Form doesn't return to Menu Posted by Tamar Granor @ 5/22/2012 10:32:34 PM
RE: Form doesn't return to Menu Posted by Can Gökmen @ 5/23/2012 8:57:23 AM