Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to hide a form a the menu window list
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00495236
Message ID:
00495672
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform