Carmen,
Are you sure that your users will not want to have independent instances of Form1 open at the same time?
You can use a form menu manager to handle this. It can iterate through the _screen.Forms[] collection and just activate the existing form. Your menu code could look like:
=FormManager( "frmClient", "client" )
function FormManager( pcFormName, pcSCXFile )
local llFound, loForm
llFound = .f.
for each loForm in _screen.Forms
if ( loForm.Name == pcFormName )
llFound = .t.
loForm.Activate()
exit
endif
endfor
if ( ! llFound )
do form (pcSCXFile)
endif
return
>I have two form called form1 and form2, all in modeless type.
>Once i click on the form1 on the menu, then the form1 will displayed, so then
>i click on the form2 from the menu without closing the form1. The form1 will stay behind the form2. The Question is If I go to the menu click Form1, the another form1 will be diplayed. therefore totally three have displayed. How do i make it the original form1 will go infront instead of calling another form1 again.