Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to hide a form a the menu window list
Message
From
15/04/2001 18:26:11
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00495236
Message ID:
00495672
Views:
9
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>every open form is shown in the main menu, window
>menu list and can be selected by the user.
>It does not matter whether the form is visible or not.
>
>Is there a possibility to hide a form in this window
>list? In my case it is a hidden window (noshow) which should
>not show up in this list.
>
>Thanks.
>
>Andreas
Dear Andreas,

it is very easy. Use the VFP built-in system menu Windows pad.
To make unavailabale a window in that list, you must make empty the window caption AND make invisible.
so make a custom cCaption Property into your base form class, and modify the hide and show method code like this:

hide:

if !empty(thisform.caption)
thisform.cCaption=thisform.caption
endif
thisform.caption=""
dodefault()


show:

LPARAMETERS nStyle
if !empty(this.cCaption)
thisform.caption=this.cCaption
endif

if pcount()=1
dodefault(nStyle)
else
dodefault()
endif


that's all!

bb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform