FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MENU BAR QUESTION
Posts: 7
Joined: Sat Jan 28, 2017 05:08 AM
MENU BAR QUESTION
Posted: Mon Dec 26, 2022 10:59 PM
Hello Fivewin Community,

There is a question about Menu bar
This is the code:
Code (fw): Select all Collapse
#Include "FiveWin.ch"

#define CLR_MSPURPLE RGB( 0,  120, 215 )
#define CLR_MSRED    RGB( 232,  17,  35 )
#define CLR_MSGRAY   RGB( 229, 229, 229 )

STATIC oFontMenu, oFont, oWnd

FUNCTION Main()

   LOCAL oImage
   LOCAL ScreenWidth := GetSysMetrics(0), ScreenHeight := GetSysMetrics(1)
   LOCAL cFont  := "Tahoma"
   LOCAL cFontH := -14
   LOCAL oBar

   DEFINE FONT oFontMenu NAME cFont SIZE 0, cFontH WEIGHT 300
   DEFINE FONT oFont     NAME cFont SIZE 0, cFontH - 2 // WEIGHT 300

   DEFINE WINDOW oWnd STYLE WS_POPUP FROM 0, 0 TO ScreenHeight, ScreenWidth ;
      PIXEL NOSYSMENU NOICONIZE COLOR CLR_RED,CLR_RED                                            ;
      MENU MyMenu()

   DEFINE BUTTONBAR oBar LEFT SIZE 100,100 COLOR RGB(1,1,1) NOBORDER OF oWnd FLAT 

   oImage := TImage():Define( , "..\BITMAPS\brush1.bmp", oWnd )

   //oWnd:bPainted := {|hDC| PalBmpDraw( hDC, 0, 0, oImage:hBitmap, oImage:hPalette, ScreenWidth, ScreenHeight, , .T., Chr(0) ) }

   oWnd:SetFont( oFont )
   oWnd:Center()

   ACTIVATE WINDOW oWnd MAXIMIZED

RETURN NIL

FUNCTION MyMenu()

   LOCAL oMenu

   MENU oMenu HEIGHT -4.8 FLAT COLORMENU RGB(1,1,1), CLR_MSPURPLE ;
      COLORLINEBOTTOM RGB(1,1,1) FONT oFontMenu NOBORDER // 2013

      MENUITEM "&Archivos" 
      MENU FLAT NOBORDER
         MENUITEM "&Clientes"                                //  ACTION Clientes(user)
         MENUITEM "&Proveedores"                             //  ACTION Proveed()
         MENUITEM "&Stocks"                                  //  ACTION  Stock()
         MENUITEM "&Componentes"                             //  ACTION  iStock()
         MENUITEM "&Cuentas Corrientes por Cliente"          //  ACTION  CtacteT()
         MENUITEM "&Vendedores"                              //  ACTION  Vendedor()
         MENUITEM "&Comprobantes Emitidos"                   //  ACTION  Facremit()
         MENUITEM "&Cobranzas"                               //  ACTION  Vfacrem()
         MENUITEM "&Recibos"                                 //  ACTION  Recibo1()
         MENUITEM "&Transporte"                              //  ACTION  Tra()
         MENUITEM "&Generar Etiquetas Precios y Cod. Barr."  //  ACTION  mainprub()
         MENUITEM "&Generar Etiquetas Precios y Cod. Barr."  //  ACTION  pruebax()
      ENDMENU

      MENUITEM "&Ventas"
      MENU
         MENUITEM  oemtoansi("&Facturaci¢n")         //  Action (xtipo:= "factura",GRID())
         MENUITEM  oemtoansi("&Facturaci¢n PRUEBA")  //  Action (xtipo:= "factura",SBARRAY())
         MENUITEM  oemtoansi("&Remitos")             //  Action ( xtipo:= "remito",RGRID())
         MENUITEM  oemtoansi("&Pedidos")             //  Action (xtipo:= "pedido",PGRID())
      ENDMENU

      MENUITEM "&Compras"
      MENU
         MENUITEM  oemtoansi("&Compras")                                   //  Action cGRID()
         MENUITEM  oemtoansi("&Consultas Compras x Proveedores Facturas")  //  Action ( compras() )
         MENUITEM  oemtoansi("&Consultas Compras x Proveedores Totales ")  //  Action ( comprasp() )
         MENUITEM  oemtoansi("&Cuentas Corrientes  Proveedores")           //  Action ( CTACTET1() )
      ENDMENU

      MENUITEM "Caja"
      MENU
         MENUITEM "&Caja"                 //  ACTION  Caja()
         MENUITEM "Tarjetas de &credito"  //  ACTION  TARJETA()
      ENDMENU

      MENUITEM "Cheques"
      MENU
         MENUITEM "C&heques"                 //  ACTION  CHEQUE()
         MENUITEM "Vencimietos de C&heques"  //  ACTION  cCHEck()
      ENDMENU

      MENUITEM "Bancos"
      MENU
         MENUITEM "&Cuentas "                //  ACTION  CUENTAS()
         MENUITEM "&Movimientos Bancarios "  //  ACTION  Movban()
         MENUITEM "&Cuentas/Saldos "         //  ACTION  Salban()
         MENUITEM "&Importar desde Excel "   //  action   (rBancosS(),impoexcel1c())
      ENDMENU

      MENUITEM "&Libros IVA"
      MENU
         MENUITEM "&IVA Ventas"                                           //  ACTION  livav()
         MENUITEM "&Exportar a Regimen Informacion Ventas Comprobantes"   //  ACTION  CITIVC()
         MENUITEM "&Exportar a Regimen Informacion Ventas Alicuotas"      //  ACTION  CITIVCA()
         MENUITEM  oemtoansi("&IVA Compras")                              //  Action livac()
         MENUITEM "&Exportar a Regimen Informacion Compras Comprobantes"  //  ACTION  CITICC()
         MENUITEM "&Exportar a Regimen Informacion Compras Alicuotas"     //  ACTION  CITICCA()
      ENDMENU

      MENUITEM "&Informes y Estadisticas"
      MENU
         MENUITEM "&Ventas Diarias y Mensuales"                                         //  action Vdym()
         *MENUITEM "&Ventas Diarias y Mensuales por horario"                            //  *action Vdymh()
         MENUITEM "&Ventas Diarias y Mensuales Por Rubro"                               //  action Vdym2()
         MENUITEM "&Ventas Diarias y Mensuales Por Vendedor"                            //  action Vdymv()
         MENUITEM "&Presupuestos / Pedidos  Diarios y Mensuales Por Cliente detallada"  //  action Vdyp()
         MENUITEM "&Presupuestos / Pedidos diarios y mensuales"                         //  action Vdymp()
         MENUITEM "&Listado de  Precios 1 "                                             //  action  (repLPRE(),lstoc())
         MENUITEM "&Listado de  Precios 2 "                                             //  action  (repLPRE(),lstoc1())
         MENUITEM "&Listado de  Precios 3 "                                             //  action  (repLPRE(),lstoc2())
         MENUITEM "&Listado de  Precios 4 "                                             //  action  (repLPRE(),lstoc3())
      ENDMENU

      MENUITEM OEMTOANSI("Configuraci¢n")
      MENU
         MENUITEM "&Empresa"                       //         ACTION  empresa()
         MENUITEM "&Back Up de Archivos"           //         ACTION  czip()
         MENUITEM "&Restaurar Archivos"            //         ACTION  dzip()
         MENUITEM "&Numeracion de Comprobantes"    //         ACTION  talonar()
         MENUITEM "&Rubros"                        //         ACTION  Rubro()
         MENUITEM "&Rubros Compras"                //         ACTION  Rubroc()
         MENUITEM "&Cotizacion Monedas"            //         ACTION  Cotiz()
         MENUITEM "&Usuarios"                      //         ACTION  User()
         MENUITEM "&Reorganizacion de archivos"    //         ACTION  Indexa()
         MENUITEM "&Modificacion de Codigo Stock"  //         ACTION  Mstock()
         MENUITEM "&Texto"                         //         ACTION  clausula()
         MENUITEM "&Datos Conexion"                //         ACTION  Dconex()
         MENUITEM "&Aumento de Precios"            //         ACTION  Aumento()
      ENDMENU

      MENUITEM "&Salir"  ACTION ( oWnd:End() )
      MENUITEM ""  
      MENUITEM ""
      MENUITEM ""
      MENUITEM ""
      MENUITEM ""  
      MENUITEM ""
      MENUITEM ""
      MENUITEM ""
//      MENUITEM "-" //FONT oFont
//      MENUITEM "x" //FONT oFont

   ENDMENU

RETURN( oMenu )
And i want to delete( or not show ) the gray border in the Menu.




Is there an option to do it?

Regards.
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: MENU BAR QUESTION
Posted: Tue Dec 27, 2022 06:14 AM

I am testing with your example and it is possible that there is a problem if the COLORMENU clause is used together with the NOBORDER clause.

Please wait for my reply.

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: MENU BAR QUESTION
Posted: Thu Dec 29, 2022 02:35 AM

Please, what version of Fivewin are you using?

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 7
Joined: Sat Jan 28, 2017 05:08 AM
Re: MENU BAR QUESTION
Posted: Thu Dec 29, 2022 08:34 PM
cnavarro wrote:Please, what version of Fivewin are you using?
FiveWin for Harbour 19.05 - May. 2019 Harbour development power │▄
│ (c) FiveTech 1993-2019 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
Posts: 7
Joined: Sat Jan 28, 2017 05:08 AM
Re: MENU BAR QUESTION
Posted: Tue Jan 10, 2023 10:11 PM

Happy 2023 FiveWin Community!!!!!

Continue the discussion