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
 Tags
Subject: Form doesn't return to Menu
Thread ID: 345125 Message ID: 345125 # Views: 70 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: VFP and .NET
Date: Friday, May 18, 2012 4:22:26 PM         
   


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.

--------------------------
PROCEDURE main1
ON SHUTDOWN CLEAR EVENTS
DO setup1
DO menu1
ENDPROC
*****************************
PROCEDURE setup1
CLEAR
PUSH MENU _MSYSMENU
SET SYSMENU SAVE
SET SYSMENU TO
RETURN
ENDPROC
*****************************
PROCEDURE menu1
DEFINE MENU mnu BAR AT LINE 0
DEFINE PAD pad1 OF mnu PROMPT "Pad1"
ON PAD pad1 OF mnu 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 mnu PROMPT "Exit"
ON SELECTION PAD padExit OF mnu DO Exit1
ACTIVATE MENU mnu
READ EVENTS
DEACTIVATE MENU mnu
RELEASE MENUS mnu EXTENDED
SET SYSMENU TO DEFAULT
POP MENU _MSYSMENU
RETURN
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
*****************************

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