FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Parpadeo de Menu COLOR , Ayuda
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Wed Oct 19, 2022 12:55 AM
Fabian, prueba este ejemplo y dime si te funciona correctamente

Code (fw): Select all Collapse
#include "Fivewin.ch"

Static oFontMenu
Static oFont
Static oWnd

Function Main()

   local cFont  := "Tahoma"  //"Segoe UI Symbol"  // "Calibri"
   local cFontH := -14 

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

   DEFINE WINDOW oWnd MENU MyMenu() STYLE WS_POPUP


   ACTIVATE WINDOW oWnd MAXIMIZED

Return nil

Function MyMenu()

   local oMenu

   MENU oMenu HEIGHT -4.8 COLORMENU CLR_BLUE, CLR_WHITE;
      FONT oFontMenu NOBORDER // 2013


      MENUITEM "&Archivos"
      MENU
         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
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: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Wed Oct 19, 2022 04:28 PM

Gracias , Cristobal lo probe pero me sigue parpadeando

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Wed Oct 19, 2022 08:05 PM
Intenta ahora,

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

   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                                             ;
      MENU MyMenu()

   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 COLORMENU CLR_BLUE, CLR_MSPURPLE ;
      FONT oFontMenu NOBORDER // 2013

      MENUITEM "&Archivos"
      MENU
         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 )


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Fri Oct 21, 2022 01:04 AM

Gracias Karinha, Gracias Cristobal los dos ejemplos que me enviaron me siguen parpadeando , voy a seguir investigando nuevamente gracias Fabian

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Fri Oct 21, 2022 05:44 AM
devwin2010 wrote:Gracias Karinha, Gracias Cristobal los dos ejemplos que me enviaron me siguen parpadeando , voy a seguir investigando nuevamente gracias Fabian

Fabian, describe en la medida de lo posible el parpadeo al que te refieres.
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: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Sat Oct 22, 2022 11:39 PM

Cristobal ,te envio un ejemplo , mira cuando le doy click de mouse en configuracion el parpadeo que me hace

https://freeimage.host/i/DKIu14

Gracias
Fabian

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Sun Oct 23, 2022 12:30 AM

Ya veo a qué te refieres
Tiene un Brush el menu ?

He probado varias cosas y no consigo reproducir el problema
Qué versión de Fw estás utilizando?

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: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Sun Oct 23, 2022 03:31 PM

Cristobal estoy usando la FWH 21.11 , XHARBOUR 1.2.3 BCC 7. 3 , estoy pensando que puede ser el monitor tengo un DELL E177FP G.2.2 D65

Posts: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Sun Oct 23, 2022 03:51 PM

Ahora bien probe sin colores solo con 2013 y logre reducir bastante el parpadeo

https://freeimage.host/i/DCIt3b

Gracias
Cristobal

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Sun Oct 23, 2022 11:02 PM
No consigo reproducir el problema que muestras en tu primera imagen
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: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Mon Oct 24, 2022 01:06 PM

Muestra cómo te va completo por favor. Haga una DEMO y póngala en Mega Upload para probarla. ¿Puede ser? Gracias.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Wed Oct 26, 2022 06:43 PM

Cristobal en la captura que te envie de ejemplo el parpadeo se produce cuando hago click de mouse en la opcion datos/clientes .

como haces agregarle un brush a menu bar gracias

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Wed Oct 26, 2022 06:50 PM
Oye, ponme una captura con el ejemplo que yo puse a ver si ocurre lo mismo
No me contestaste: en tu ejemplo qué color es el que pones en la barra de menú ?
Para poner un brush
Code (fw): Select all Collapse
.../...
             [ <BRUSH> <cBrush> ] ;
.../...
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: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Wed Oct 26, 2022 07:48 PM

Cristobal en ejemplo que me haces referencia no tiene color

MENU oMnu 2013 ;

  NOBORDER ;

  ROUND 8 FONT oFont ;

  UPPERMNU ADJUST //NOCENTER //Add or Remove clausule and look height of menu bar and items



   MENUITEM "Test" FILE "..\icons\fivewin.ico"



 es  el  ejemplo  mnu01.prg   que viene  en   la carpeta  samples

Te pregunte lo del Brush por que quise probar , pero me dio error estoy usando ver FWH2111

gracias

Fabian

Posts: 69
Joined: Tue Jul 17, 2007 12:37 PM
Re: Parpadeo de Menu COLOR , Ayuda
Posted: Wed Oct 26, 2022 07:53 PM

Continue the discussion