Como usar VistaMenu con MDI?
Regards, saludos.
// \samples\VISTAMN1.PRG
#include "fivewin.ch"
STATIC oWnd
FUNCTION Main()
聽 聽// LOCAL oWnd
聽 聽LOCAL oVmenu
聽 聽LOCAL oItem
聽 聽LOCAL oIcon
聽 聽DEFINE ICON oIcon NAME "C5ICON"
聽 聽DEFINE WINDOW oWnd TITLE "First test VistaMenu" ICON oIcon
聽 聽oVMenu := TVistaMenu():New( 0, 0, 100, 100, oWnd )
聽 聽oVMenu:nColumns := 1
聽 聽oVMenu:nType := 2
聽 聽oItem := oVMenu:AddItem( "Sistema y mantenimiento ", ".\..\bitmaps\pngs\image1.png" )
聽 聽oItem:AddItem( "Empezar a trabajar con windows",, ;
聽 聽 聽 {|| MsgInfo( "Sistema y mantenimiento" ) } )
聽 聽oItem:AddItem( "Hacer una copia de seguridad del equipo" )
聽 聽oItem:AddItem( "Item 1 Item 1" )
聽 聽oItem:AddItem( "ItemItem2 ItemItem2" )
聽 聽oItem:AddItem( "ItemItemItem3 ItemItemItem3" )
聽 聽/*
聽 聽oItem := oVMenu:AddItem( "Tabelas ", "" )
聽 聽oItem:AddItem( "Ramo de Atividades",, ;
聽 聽 聽 {| o | o := SILVIOMDI_FWH() } )
聽 聽*/
聽 聽oItem := oVMenu:AddItem( "Seguridad", ".\..\bitmaps\pngs\image2.png" )
聽 聽oItem:AddItem( "Window MDI Usando Vista",, ;
聽 聽 聽 {| o | o := VISTA_MDI_FWH( oWnd ) } )
聽 聽/*
聽 聽oItem:AddItem( "Buscar actualizaciones" )
聽 聽*/
聽 聽oItem:AddItem( "Dejar pasar un programa a trav茅s de Firewall de Windows" )
聽 聽oItem := oVMenu:AddItem( "Redes e Internet", ".\..\bitmaps\pngs\image3.png" )
聽 聽oItem:lEnable := .F.
聽 聽oItem:AddItem( "Ver el estado y las tareas de red" )
聽 聽oItem:AddItem( "Configurar el uso compartido de archivos" )
聽 聽oItem := oVMenu:AddItem( "Hardware y sonido", ".\..\bitmaps\pngs\image4.png" )
聽 聽oItem:AddItem( "Reproducir un CD u otros archivos multimedia autom谩ticamente" )
聽 聽oItem:AddItem( "Impresora" )
聽 聽oItem:AddItem( "Mouse" )
聽 聽oItem := oVMenu:AddItem( "Programas", ".\..\bitmaps\pngs\image5.png" )
聽 聽oItem:AddItem( "Desinstalar un programa" )
聽 聽oItem:AddItem( "Cambiar programas de inicio" )
聽 聽oItem := oVMenu:AddItem( "Equipo portatil", ".\..\bitmaps\pngs\image6.png" )
聽 聽oItem:AddItem( "Cambiar la configuraci贸n de la bateria" )
聽 聽oItem:AddItem( "Ajustar parametros de configuraci贸n de movilidad de uso frecuente" )
聽 聽oItem := oVMenu:AddItem( "Cuentas de usuario", ".\..\bitmaps\pngs\image7.png" )
聽 聽oItem:AddItem( "Cambiar tipo de cuenta" )
聽 聽oItem := oVMenu:AddItem( "Opciones adicionales", ".\..\bitmaps\pngs\image12.png" )
聽 聽oItem := oVMenu:AddItem( "Apariencia y personalizaci贸n", ".\..\bitmaps\pngs\image8.png" )
聽 聽oItem:AddItem( "Cambiar fondo de escritorio" )
聽 聽oItem:AddItem( "Cambiar la combinaci贸n de colores" )
聽 聽oItem:AddItem( "Ajustar la resoluci贸n de pantalla" )
聽 聽oItem := oVMenu:AddItem( "Reloj, idioma y regi贸n", ".\..\bitmaps\pngs\image9.png" )
聽 聽oItem:AddItem( "Cambiar teclados u otros m茅todos de entrada" )
聽 聽oItem:AddItem( "Cambiar el idioma para mostrar" )
聽 聽oItem := oVMenu:AddItem( "Accesibilidad", ".\..\bitmaps\pngs\image10.png" )
聽 聽oItem:AddItem( "Permitir que Windows sugiera parametros de configuraci贸n" )
聽 聽oItem:AddItem( "Optimizar la presentaci贸n visual" )
聽 聽oWnd:oClient := oVMenu
聽 聽ACTIVATE WINDOW oWnd CENTERED MAXIMIZED
RETURN 0
FUNCTION VISTA_MDI_FWH( oWnd )
聽 聽Local oBrw,oBar, oWndClients, oMsgBar
聽 聽use customer
聽 聽DEFINE WINDOW oWndClients MDICHILD OF oWnd TITLE "Clients"
聽 聽@ 2, 0 XBROWSE oBrw OF oWndClients LINES AUTOSORT ;
聽 聽 聽 聽 聽AUTOCOLS DATASOURCE "Customer" NOBORDER
聽 聽oBrw:CreateFromCode()
聽 聽oBrw:SetFocus()
聽 聽DEFINE BUTTONBAR oBar OF oWndClients 2015 SIZE 70, 60
聽 聽oWndClients:oClient = oBrw
聽 聽oWndClients:oControl = oBrw
聽 聽DEFINE MSGBAR oMsgBar OF oWndClients 2015
聽 聽 ACTIVATE WINDOW oWndClients MAXIMIZED ;
聽 聽 聽 聽 聽VALID ( oWndClients := nil, .T. )
RETURN NILRegards, saludos.
Jo茫o Santos - S茫o Paulo - Brasil - Phone: +55(11)95150-7341
