messages
listlengths
1
1
topic
stringlengths
2
60
[ { "date": "2016-09-28", "forum": "FiveWin for Harbour/xHarbour", "text": "[url:140rmiqs]https://code.google.com/archive/p/fivewin-contributions/downloads?page=9[/url:140rmiqs]", "time": "21:13", "topic": "ClassGriaule.zip", "username": "karinha" } ]
ClassGriaule.zip
[ { "date": "2016-09-29", "forum": "FiveWin for Harbour/xHarbour", "text": "Hi Marca,\n\nI told you, The solution is not so simple and ActiveX is not a good way to take.\nFew years ago I did a procedure in C/C++ to work with it.\n\nI sent you a demo my procedures, and How you see it works.", "time": "12:10", "topic": "ClassGriaule.zip", "username": "Lailton" } ]
ClassGriaule.zip
[ { "date": "2016-09-29", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello Marcelo,\n\nBefore purchasing any source from Laiton, please check in the forum how he treated his customers, particulary on Fiveweb.\n\nAlso, Griaule has changed so much from old versions....", "time": "13:10", "topic": "ClassGriaule.zip", "username": "lucasdebeltran" } ]
ClassGriaule.zip
[ { "date": "2008-02-13", "forum": "FiveWin for Harbour/xHarbour", "text": "could someone provide a short translation from these links\nor a description of CLASSSEL()\n\nThanks in advance\nOtto\n\n<!-- m --><a class=\"postlink\" href=\"http://fivetechsoft.com/forums/viewtopic.php?t=723&highlight=classsel\">http://fivetechsoft.com/forums/viewtopi ... t=classsel</a><!-- m -->\n\n<!-- m --><a class=\"postlink\" href=\"http://fivetechsoft.com/forums/viewtopic.php?t=7201&highlight=classsel\">http://fivetechsoft.com/forums/viewtopi ... t=classsel</a><!-- m -->\n\n<!-- m --><a class=\"postlink\" href=\"http://fivetechsoft.com/forums/viewtopic.php?t=8297&highlight=classsel\">http://fivetechsoft.com/forums/viewtopi ... t=classsel</a><!-- m -->\n\n\n local o := ErrorNew() // Vamos a ver las DATAs de un objeto error \n local aInfo := o:ClassSel() \n \n for n = 1 to Len( aInfo ) \n if Left( aInfo[ n ], 1 ) == \"_\" \n MsgInfo( SubStr( aInfo[ n ], 2 ) ) \n endif \n next", "time": "10:01", "topic": "ClassSel", "username": "Otto" } ]
ClassSel
[ { "date": "2008-02-13", "forum": "FiveWin for Harbour/xHarbour", "text": "Otto,\n\nIt returns an array with all the names of the methods and datas of the class.\n\nDatas are returned twice, with \"_\" before for assignment, and without it to retrive their values.", "time": "10:23", "topic": "ClassSel", "username": "Antonio Linares" } ]
ClassSel
[ { "date": "2008-02-13", "forum": "FiveWin for Harbour/xHarbour", "text": "Antonio, thank you.\nRegards,\n Otto", "time": "11:41", "topic": "ClassSel", "username": "Otto" } ]
ClassSel
[ { "date": "2006-12-11", "forum": "FiveWin para Harbour/xHarbour", "text": "Olá,\n\nNo xharbour existe uma classe para acessar a freeimage.dll, só que, quando incluo o \"freeimage.ch\", como no programa abaixo é gerado os erros abaixo:\n\n#include \"fivewin.ch\"\n#include \"FreeImage.ch\"\n#include \"common.ch\"\n\nfunction Main()\n\n local oWnd, oBmp\n\n DEFINE WINDOW oWnd TITLE \"SaveToBmp\"\n\n ACTIVATE WINDOW oWnd\n \nreturn nil\n\n\n\nApplication\n===========\n Path and name: C:\\teste\\imag8.exe (32 bits)\n Size: 1,565,184 bytes\n Error occurred at: 12/11/06, 17:30:40\n Error description: Error BASE/2023 Argument error: SizeOfCStructure\n Args:\n [ 1] = A { ... }\n\nStack Calls\n===========\n Called from: => HB_SIZEOFCSTRUCTURE(0)\n Called from: cstruct.prg => __ACTIVESTRUCTURE(150)\n Called from: => __INIT_BITMAPINFOHEADER$(0)\n\nIsto é alguma incompatibilidade ? Como corrigir isto ?\n\nObrigado,\n\nRossine.", "time": "20:34", "topic": "Classe FreeImage de xharbour + fwh", "username": "Rossine" } ]
Classe FreeImage de xharbour + fwh
[ { "date": "2006-12-11", "forum": "FiveWin para Harbour/xHarbour", "text": "wich image class use ?", "time": "23:49", "topic": "Classe FreeImage de xharbour + fwh", "username": "Silvio" } ]
Classe FreeImage de xharbour + fwh
[ { "date": "2006-12-12", "forum": "FiveWin para Harbour/xHarbour", "text": "Hello Silvio,\n\nI am trying to use the class \\xharbour\\contrib\\freeimage\n\nBest regards.", "time": "12:10", "topic": "Classe FreeImage de xharbour + fwh", "username": "Rossine" } ]
Classe FreeImage de xharbour + fwh
[ { "date": "2006-12-12", "forum": "FiveWin para Harbour/xHarbour", "text": "Olá,\n\nEsta classe realmente é muito boa e tem várias funções para se trabalhar com a freeimage, mas não consigo usá-la junto com FWH. \n\nVeja um exemplo abaixo:\n\n[code:243bd3g3]\n/*\n * $Id&#58; fitest&#46;prg,v 1&#46;3 2006/05/12 22&#58;55&#58;51 lculik Exp $\n */\n\n/*\n * Copyright 2005 Francesco Saverio Giudice <info@fsgiudice&#46;com>\n *\n * FreeImage API test file\n */\n\n#include \"FreeImage&#46;ch\"\n#include \"common&#46;ch\"\n\n#define IMAGES_IN \"images_in/\"\n#define IMAGES_OUT \"images_out/\"\n\nPROCEDURE Main&#40;&#41;\n\n LOCAL im, clone, rotated, rotatedEx, rescale, im2, im3\n LOCAL centerX, centerY, width, height, appo\n LOCAL bmpinfoheader IS BITMAPINFOHEADER\n LOCAL bmpinfo IS BITMAPINFO\n LOCAL bkcolor IS RGBQUAD\n LOCAL iccprofile IS FIICCPROFILE\n\n// ? \"Press Alt-D + Enter to activate debug\"\n// AltD&#40; &#46;T&#46; &#41;\n// Inkey&#40;0&#41;\n\n*set console OFF\n*set printer ON\n\n altd&#40;&#41;\n // Check output directory\n IF !ISDirectory&#40; IMAGES_OUT &#41;\n DirMake&#40; IMAGES_OUT &#41;\n ENDIF\n\n ? \"Initialise\"\n fi_Initialise&#40;&#41;\n //---------------------------//\n\n ? \"Set Error Message&#58;\", fi_SetOutPutMessage&#40; @fi_Error&#40;&#41; &#41;\n //? \"Set Error Message&#58;\", fi_SetOutPutMessage&#40; NIL &#41;\n\n ? \"Version &#58;\", fi_GetVersion&#40;&#41;\n ? \"Copyright &#58;\", fi_GetCopyrightMessage&#40;&#41;\n ? \"File type &#58;\", fi_GetFileType&#40; IMAGES_IN + \"xharbour&#46;jpg\" &#41;\n ? \"Load JPEG\"\n im &#58;= fi_Load&#40; FIF_JPEG, IMAGES_IN + \"xharbour&#46;jpg\", JPEG_DEFAULT &#41;\n\n ? \"Clone image\"\n clone &#58;= fi_Clone&#40; im &#41;\n\n ? \"Pointer &#58;\", ValToPrg&#40; im &#41;\n\n ? \"Image Type &#58;\", fi_GetImageType&#40; im &#41;\n ? \"Color Used &#58;\", fi_GetColorsUsed&#40; im &#41;\n ? \"Pixel size &#58;\", fi_GetBPP&#40; im &#41;\n ? \"Width &#58;\", fi_GetWidth&#40; im &#41;\n ? \"Height &#58;\", fi_GetHeight&#40; im &#41;\n ? \"Byte Size &#58;\", fi_GetLine&#40; im &#41;\n ? \"Pitch &#58;\", fi_GetPitch&#40; im &#41;\n ? \"DIB Size &#58;\", fi_GetDIBSize&#40; im &#41;\n ? \"Dots per Meter X &#58;\", fi_GetDotsPerMeterX&#40; im &#41;\n ? \"Dots per Meter Y &#58;\", fi_GetDotsPerMeterY&#40; im &#41;\n ? \"Color Type &#58;\", fi_GetColorType&#40; im &#41;\n ? \"Red Mask &#58;\", fi_GetRedMask&#40; im &#41;\n ? \"Green Mask &#58;\", fi_GetGreenMask&#40; im &#41;\n ? \"Blue Mask &#58;\", fi_GetBlueMask&#40; im &#41;\n ? \"Transp&#46; Count &#58;\", fi_GetTransparencyCount&#40; im &#41;\n ? \"Is Transparent ? &#58;\", fi_IsTransparent&#40; im &#41;\n ?\n ? \"Save BMP ? &#58;\", fi_Save&#40; FIF_BMP , im, IMAGES_OUT + \"xharbour&#46;bmp\", BMP_DEFAULT &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im, IMAGES_OUT + \"xharbour&#46;jpg\", JPEG_DEFAULT &#41;\n ? \"Save PNG ? &#58;\", fi_Save&#40; FIF_PNG , im, IMAGES_OUT + \"xharbour&#46;png\", PNG_DEFAULT &#41;\n\n ? \"Save TIFF ? &#58;\", fi_Save&#40; FIF_TIFF, clone, IMAGES_OUT + \"xharbour&#46;tif\", TIFF_DEFAULT &#41;\n ? \"Flip Horizontal ?&#58;\", fi_FlipHorizontal&#40; clone &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, clone, IMAGES_OUT + \"horizontal&#46;jpg\", JPEG_DEFAULT &#41;\n ? \"Flip Vertical ? &#58;\", fi_FlipVertical&#40; clone &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, clone, IMAGES_OUT + \"vertical&#46;jpg\", JPEG_DEFAULT &#41;\n\n ? \"Rotate Classic &#58;\", ValToPrg&#40; rotated &#58;= fi_RotateClassic&#40; clone, 90 &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, rotated, IMAGES_OUT + \"rotate&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; rotated &#41;\n\n centerx &#58;= fi_GetWidth&#40; clone &#41; / 2\n centery &#58;= fi_GetHeight&#40; clone &#41; / 2\n ? \"Rotate Ex &#58;\", ValToPrg&#40; rotatedEx &#58;= fi_RotateEx&#40; clone, 15, 0, 0, centerx, centery, TRUE &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, rotatedEx, IMAGES_OUT + \"rotateEx&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; rotatedEx &#41;\n\n width &#58;= fi_GetWidth&#40; im &#41;\n height &#58;= fi_GetHeight&#40; im &#41;\n\n ? \"Rescale &#58;\", ValToPrg&#40; rescale &#58;= fi_Rescale&#40; im, width / 2, height / 2, FILTER_BICUBIC &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, rescale, IMAGES_OUT + \"rescale&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; rescale &#41;\n\n im2 &#58;= fi_Clone&#40; im &#41;\n ? \"Adjust Gamma ? &#58;\", fi_AdjustGamma&#40; im2, 3&#46;0 &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"adjgamma&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n\n im2 &#58;= fi_Clone&#40; im &#41;\n ? \"Adjust Brightness&#58;\", fi_AdjustBrightness&#40; im2, -30 &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"adjbright&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n\n im2 &#58;= fi_Clone&#40; im &#41;\n ? \"Adjust Contrast ?&#58;\", fi_AdjustContrast&#40; im2, -30 &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"adjcontrast&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n\n im2 &#58;= fi_Clone&#40; im &#41;\n ? \"Invert ? &#58;\", fi_Invert&#40; im2 &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"invert&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n\n ? \"Red Channel &#58;\", ValToPrg&#40; im2 &#58;= fi_GetChannel&#40; im, FICC_RED &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"red&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n\n ? \"Green Channel &#58;\", ValToPrg&#40; im2 &#58;= fi_GetChannel&#40; im, FICC_GREEN &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"green&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n\n ? \"Blue Channel &#58;\", ValToPrg&#40; im2 &#58;= fi_GetChannel&#40; im, FICC_BLUE &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"blue&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n\n ? \"Copy &#58;\", ValToPrg&#40; im2 &#58;= fi_Copy&#40; im, 300, 100, 800, 200 &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im2, IMAGES_OUT + \"copy&#46;jpg\", JPEG_DEFAULT &#41;\n\n im3 &#58;= fi_Clone&#40; im &#41;\n ? \"Paste ? &#58;\", fi_Paste&#40; im3, im2, 10, 10, 70 &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im3, IMAGES_OUT + \"paste&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im2 &#41;\n fi_Unload&#40; im3 &#41;\n\n ? \"Allocate Bitmap &#58;\", ValToPrg&#40; im3 &#58;= fi_AllocateT&#40; FIT_BITMAP, 320, 200, 32 &#41; &#41;\n ? \"Save JPG ? &#58;\", fi_Save&#40; FIF_JPEG, im3, IMAGES_OUT + \"allocate&#46;jpg\", JPEG_DEFAULT &#41;\n fi_Unload&#40; im3 &#41;\n\n ? \"Create ERROR &#58;\"\n ? \"Save GIF ? &#58;\", fi_Save&#40; FIF_GIF, im, IMAGES_OUT + \"wrong&#46;gif\", 0 &#41;\n\n //? ValToPrg&#40; fi_GetInfoHeader&#40; im &#41; &#41;\n //bmpinfoheader&#58;Buffer&#40; fi_GetInfoHeader&#40; im &#41;, TRUE &#41;\n bmpinfoheader&#58;Pointer&#40; fi_GetInfoHeader&#40; im &#41; &#41;\n ? \"Header &#58;\", ValToPrg&#40; bmpinfoheader &#41;\n ? bmpinfoheader&#58;SayMembers&#40;\" \", &#46;t&#46;, &#46;t&#46;&#41;\n\n bmpinfo&#58;Pointer&#40; fi_GetInfo&#40; im &#41; &#41;\n ? \"Info &#58;\", ValToPrg&#40; bmpinfo &#41;\n ? bmpinfo&#58;SayMembers&#40;\" \", &#46;t&#46;, &#46;t&#46;&#41;\n ? \"-----------------------------------------------------\"\n ? ValType&#40; bmpinfo&#58;Devalue&#40;&#41; &#41;\n //Tracelog&#40; \"bmpinfoheader\", ValToPrg&#40; bmpinfoheader &#41;, ;\n // bmpinfoheader&#58;SayMembers&#40;, &#46;t&#46;&#41;, bmpinfoheader&#58;Value&#40;&#41;, bmpinfoheader&#58;DeValue&#40;&#41;, hb_dumpvar&#40; bmpinfoheader&#58;Array&#40;&#41; &#41;, hb_dumpvar&#40; bmpinfoheader&#58;acMembers &#41; &#41;\n\n //appo &#58;= bkcolor&#58;Value&#40;&#41;\n ? bkcolor&#58;Pointer&#40; fi_GetBackgroundColor&#40; im &#41; &#41;\n //? fi_GetBackgroundColor&#40; im, @bkcolor&#58;Value&#40;&#41; &#41;\n //bkcolor&#58;Buffer&#40; appo &#41;\n ? bkcolor&#58;SayMembers&#40;\" \", &#46;t&#46;, &#46;t&#46;&#41;\n\n bkcolor&#58;rgbBlue &#58;= 205\n //? fi_SetBackgroundColor&#40; im, hb_String2Pointer&#40; bkcolor&#58;Value&#40;&#41; &#41; &#41;\n Tracelog&#40;\"linha 168\"&#41;\n ? fi_SetBackgroundColor&#40; im, bkcolor&#58;Value&#40;&#41; &#41;\n Tracelog&#40;\"linha 170\"&#41;\n ? bkcolor&#58;SayMembers&#40;\" \", &#46;t&#46;, &#46;t&#46;&#41;\nTracelog&#40;\"linha 162\"&#41;\n// ? bkcolor&#58;Pointer&#40; fi_GetBackgroundColor&#40; im &#41; &#41;\n //? fi_GetBackgroundColor&#40; im, @bkcolor&#58;Value&#40;&#41; &#41;\n //bkcolor&#58;Buffer&#40; appo &#41;\nTracelog&#40;\"linha 176\"&#41;\n ? bkcolor&#58;SayMembers&#40;\" \", &#46;t&#46;, &#46;t&#46;&#41;\n\nTracelog&#40;\"linha 179\"&#41;\n iccprofile&#58;Pointer&#40; fi_GetICCProfile&#40; im &#41; &#41;\n Tracelog&#40;\"linha 181\"&#41;\n ? \"Header &#58;\", ValToPrg&#40; iccprofile &#41;\n Tracelog&#40;\"linha 183\"&#41;\n ? iccprofile&#58;SayMembers&#40;\" \", &#46;t&#46;, &#46;t&#46;&#41;\n\n //bmpinfoheader&#58;Reset&#40;&#41;\n //appo &#58;= NIL\n //bmpinfoheader &#58;= NIL\n //hb_GCAll&#40; &#46;T&#46; &#41;\n\n ? \"Unload images from memory\"\n fi_Unload&#40; im &#41;\n fi_Unload&#40; clone &#41;\n\n\n //---------------------------//\n ? \"DeInitialise\"\n fi_Deinitialise&#40;&#41;\n\n ?\n ? \"Look at \" + IMAGES_OUT + \" folder for output images\"\n ?\n\n*set printer OFF\n*set console ON\n\nRETURN\n\nPROCEDURE fi_Error&#40; cFormat, cMessage &#41;\n ? \"ERROR!&#46;&#46;&#46;\"\n ? \"Format &#58; \", cFormat\n ? \"Message &#58; \", cMessage\nreturn \n[/code:243bd3g3]\n\nAlguém poderia me ajudar ? <!-- s:cry: --><img src=\"{SMILIES_PATH}/icon_cry.gif\" alt=\":cry:\" title=\"Crying or Very sad\" /><!-- s:cry: --> \n\nObrigado,\n\nRossine.", "time": "20:34", "topic": "Classe FreeImage de xharbour + fwh", "username": "Rossine" } ]
Classe FreeImage de xharbour + fwh
[ { "date": "2006-12-13", "forum": "FiveWin para Harbour/xHarbour", "text": "perhaps in dos run but in windows there are some problems \nI use image from emg", "time": "01:57", "topic": "Classe FreeImage de xharbour + fwh", "username": "Silvio" } ]
Classe FreeImage de xharbour + fwh
[ { "date": "2007-04-26", "forum": "FiveWin para Pocket PC", "text": "Como faco para usar esta classe HbPersistent do xharbour no FWPPC, se alguem puder me ajudar tenho urgencia nesta classe.\n\nObrigado!", "time": "12:44", "topic": "Classe HbPersistent ( xHarbour )", "username": "KRCNET" } ]
Classe HbPersistent ( xHarbour )
[ { "date": "2007-04-26", "forum": "FiveWin para Pocket PC", "text": "Cleber,\n\nHas probado a añadirla como un PRG más de tu aplicación y probar a compilarla ?", "time": "14:20", "topic": "Classe HbPersistent ( xHarbour )", "username": "Antonio Linares" } ]
Classe HbPersistent ( xHarbour )
[ { "date": "2007-01-05", "forum": "FiveWin para Harbour/xHarbour", "text": "Estoy utilizando la CLASSE LISTBOX con MYSQL(FCSODBC) pero como podría utilizar la opción de bRDblClick el Mouse de lado derecho.\n\nQuiero utilizar la opción para un MENU oMenu POPUP\n\n\nGracias \nMario", "time": "02:07", "topic": "Classe LISTBOX (bRDblClick)", "username": "maecmx" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2007-01-05", "forum": "FiveWin para Harbour/xHarbour", "text": "Mario,\n\n[code:1vbiq4f7]\n&#46;&#46;&#46; LISTBOX oBrw FIELDS &#46;&#46;&#46; ;\n ON RIGHT CLICK ShowPopup&#40; nRow, nCol, oBrw &#41;\n&#46;&#46;&#46;\n\nfunction ShowPopup&#40; nRow, nCol, oBrw &#41;\n\n local oMenu\n\n MENU oMenu POPUP\n MENUITEM \"&Colors&#46;&#46;&#46;\" ACTION &#46;&#46;&#46;\n MENUITEM \"&Font&#46;&#46;&#46;\" ACTION &#46;&#46;&#46;\n ENDMENU\n\n ACTIVATE MENU oMenu AT nRow, nCol OF oBrw\n\nreturn nil\n[/code:1vbiq4f7]", "time": "08:09", "topic": "Classe LISTBOX (bRDblClick)", "username": "Antonio Linares" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2007-01-07", "forum": "FiveWin para Harbour/xHarbour", "text": "Muchas, Gracias también me funciono así.\n\n oBTab:bRClicked:={|| Desp_Men(oDlg,90,210)}\n\nSTAT FUNC Mant_Tabla(oDlg,nRow,nCol)\n LOCAL oMenu\n MENU oMenu POPUP\n MENUITEM \"&Datos de la Tabla\" \n ENDMENU\n ACTIVATE POPUP oMenu OF oDlg AT nRow,nCol\nRETURN (NIL)", "time": "01:54", "topic": "Classe LISTBOX (bRDblClick)", "username": "maecmx" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2007-01-07", "forum": "FiveWin para Harbour/xHarbour", "text": "Bueno, yo diria que es lo mismo maecmx.\n\nEstoy hasta la m...! pasando mis 100,000 lineas de código para que funcionen con ADS en modo C/S.\n\nEn cuanto logre hacerlo funcionar compartiré las rutinas de control.\n\nGracias René por la idea pero esto me está costando un H..!", "time": "10:14", "topic": "Classe LISTBOX (bRDblClick)", "username": "Alfredo Arteaga" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2007-01-07", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"Alfredo Arteaga\":1bybx20d]Bueno, yo diria que es lo mismo maecmx.\n\nEstoy hasta la m...! pasando mis 100,000 lineas de código para que funcionen con ADS en modo C/S.\n\nEn cuanto logre hacerlo funcionar compartiré las rutinas de control.\n\nGracias René por la idea pero esto me está costando un H..![/quote:1bybx20d]\n\nAnimo!!!!!!!!\n\nHay mas tiempo que vida.\n\nSaludos", "time": "18:40", "topic": "Classe LISTBOX (bRDblClick)", "username": "wmormar" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2007-01-07", "forum": "FiveWin para Harbour/xHarbour", "text": "Gracias por el ánimo Willy.\n\nParece que la desvelada valió la pena, ya trabajan mis rutinas de apertura y cierre, solo me queda sustituir todas las llamadas y verificar que esto trabaje normalmente. Lo someteré a prueba en una semana más.\n\nYa te comentaré, saludos.", "time": "19:33", "topic": "Classe LISTBOX (bRDblClick)", "username": "Alfredo Arteaga" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2007-01-07", "forum": "FiveWin para Harbour/xHarbour", "text": "adelante !! alfredo, las desveladas son caras, pero resulta que es cuando mejor nos funciona el cerebro a los programadores, al menos en lo propio por la madrugada resuelvo muchos de mis problemas complejos, saludos y suerte !!\npaco", "time": "20:12", "topic": "Classe LISTBOX (bRDblClick)", "username": "Francisco Horta" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2007-01-09", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"Francisco Horta\":38wr3mvq]adelante !! alfredo, las desveladas son caras, pero resulta que es cuando mejor nos funciona el cerebro a los programadores, al menos en lo propio por la madrugada resuelvo muchos de mis problemas complejos, saludos y suerte !!\npaco[/quote:38wr3mvq]\n\nComparto indiscutiblemente tu punto de vista.\n\njjejjejjejjejje\n\nsaludos a los dos\n\nAlfred, claro, estaremos pendientes", "time": "09:34", "topic": "Classe LISTBOX (bRDblClick)", "username": "wmormar" } ]
Classe LISTBOX (bRDblClick)
[ { "date": "2015-05-19", "forum": "All products support", "text": "Boa Tarde,\n \nEstou a ver vários exemplos da classe metro e não estou a conseguir fazer o que desejo, preciso o seguinte:\n \nna primeira tela quero que mostre 1 Metrobutton por cada registo da tabela REGIOES.DBF em que o caption é o campo nome desta mesma, quando o usuário clicar num deles preciso saber em que Recno() da REGIOES.DBF clicou , para depois fazer um filtro a tabela ARTIGOS.DBF em que o campo CodReg=RECNO() da tabela REGIOES clicado na primeira tela e mostrar todos os artigos filtrados em 1 metrobutton por cada registo, tem como fazer isso?\n \n \nCumprimentos\nJoão Alpande", "time": "11:40", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-19", "forum": "All products support", "text": "Joao,\n\nPrueba asi:\n\n[code=fw:1mpquy5a]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> &nbsp; <span style=\"color: #00C800;\">local</span> oMetro<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> METRO oMetro ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"My FWH Metro app\"</span> ;<br />&nbsp; &nbsp; &nbsp; BACKGROUND <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\h</span>ires<span style=\"color: #000000;\">\\e</span>arth.bmp\"</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style=\"color: #00C800;\">while</span> ! Eof<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON <span style=\"color: #0000ff;\">OF</span> oMetro ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">PROMPT</span> FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">COLOR</span> CLR_WHITE, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">174</span>, <span style=\"color: #000000;\">224</span> <span style=\"color: #000000;\">&#41;</span> ; &nbsp;<span style=\"color: #B900B9;\">// 1 primer campo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">IMAGE</span> <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> Records<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;end<br />&nbsp;</div>[/code:1mpquy5a]", "time": "12:29", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-19", "forum": "All products support", "text": "Gracias Antonio Linares,\n\nMUISTRA BIEN os metrobutton do dbf , cómo saber recno() do dbf el usuario hace clic ? \n\nSaludos\n\nJoão", "time": "13:32", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-19", "forum": "All products support", "text": "Joao,\n\nTienes que hacer esta modificación en metro.ch:\n[code=fw:3eu14ac3]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">#xcommand <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON <span style=\"color: #000000;\">&#91;</span><oBtn><span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">PROMPT</span> <cPrompt> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">COLOR</span> <nClrText>, <nClrPane> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">IMAGE</span> <cImgName> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">OF</span> <oMetro> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <large: <span style=\"color: #000000;\">LARGE</span>> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">ACTION</span> <uAction,...> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <oBtn> := <span style=\"color: #000000;\">&#93;</span> <oMetro>:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> <cPrompt>, <nClrText>, <nClrPane>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <.large.>, <cImgName>, <span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">&#123;</span>| <span style=\"color: #00C800;\">Self</span> |<uAction><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#41;</span></div>[/code:3eu14ac3]\n\n[code=fw:3eu14ac3]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> &nbsp;<span style=\"color: #00C800;\">local</span> oMetro, oBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> METRO oMetro ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"My FWH Metro app\"</span> ;<br />&nbsp; &nbsp; &nbsp; BACKGROUND <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\h</span>ires<span style=\"color: #000000;\">\\e</span>arth.bmp\"</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style=\"color: #00C800;\">while</span> ! Eof<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON oBtn <span style=\"color: #0000ff;\">OF</span> oMetro ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">PROMPT</span> FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">COLOR</span> CLR_WHITE, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">174</span>, <span style=\"color: #000000;\">224</span> <span style=\"color: #000000;\">&#41;</span> ; &nbsp;<span style=\"color: #B900B9;\">// 1 primer campo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">IMAGE</span> <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> ShowRecords<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">Cargo</span> <span style=\"color: #000000;\">&#41;</span> &nbsp;<br />&nbsp; &nbsp; &nbsp; oBtn:<span style=\"color: #000000;\">Cargo</span> = RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;end<br />&nbsp;</div>[/code:3eu14ac3]", "time": "16:28", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-20", "forum": "All products support", "text": "ola Antonio Linares,\n\nAlterei o metro.ch assim:\n[code=fw:1q325yyx]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">// FiveWin - Windows 8 Metro look</span><br /><br />#ifndef _METRO_CH<br /><span style=\"color: #00D7D7;\">#define</span> _METRO_CH<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br />#xcommand <span style=\"color: #0000ff;\">DEFINE</span> METRO <oMtr> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> BACKGROUND <cFileName> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> BTNSIZE <nBtnWidth>, <nBtnHeight> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">TITLE</span> <cTitle> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <oMtr> := TMetro<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <cTitle>, <nBtnWidth>, <nBtnHeight>, <cFileName> <span style=\"color: #000000;\">&#41;</span><br /><br />xcommand <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON <span style=\"color: #000000;\">&#91;</span><oBtn><span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">PROMPT</span> <cPrompt> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">COLOR</span> <nClrText>, <nClrPane> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">IMAGE</span> <cImgName> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">OF</span> <oMetro> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <large: <span style=\"color: #000000;\">LARGE</span>> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">ACTION</span> <uAction,...> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#91;</span> <oBtn> := <span style=\"color: #000000;\">&#93;</span> <oMetro>:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> <cPrompt>, <nClrText>, <nClrPane>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <.large.>, <cImgName>, <span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">&#123;</span>| <span style=\"color: #00C800;\">Self</span> |<uAction><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#41;</span><br />#xcommand <span style=\"color: #0000ff;\">ACTIVATE</span> METRO <oMtr> => <oMtr>:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br />#endif</div>[/code:1q325yyx]\n\nalterei o metro.prg assim:\n[code=fw:1q325yyx]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #0000ff;\">DEFINE</span> METRO oMetro ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"My FWH Metro app\"</span> ;<br />&nbsp; &nbsp; &nbsp; BACKGROUND <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\h</span>ires<span style=\"color: #000000;\">\\e</span>arth.bmp\"</span><br />&nbsp; &nbsp; DBSELECTAREA<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; NET_USE <span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"F_REG.DBF\"</span>, <span style=\"color: #000000;\">3</span>,.T.<span style=\"color: #000000;\">&#41;</span><br />&nbsp;<span style=\"color: #00C800;\">while</span> ! Eof<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON oBtn <span style=\"color: #0000ff;\">OF</span> oMetro ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">PROMPT</span> FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">COLOR</span> CLR_WHITE, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">174</span>, <span style=\"color: #000000;\">224</span> <span style=\"color: #000000;\">&#41;</span> ; &nbsp;<span style=\"color: #B900B9;\">// 1 primer campo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">IMAGE</span> <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> ShowRecords<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">Cargo</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oBtn:<span style=\"color: #000000;\">Cargo</span> = RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;end<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON <span style=\"color: #0000ff;\">OF</span> oMetro ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">PROMPT</span> <span style=\"color: #ff0000;\">\"Exit\"</span> <span style=\"color: #0000ff;\">COLOR</span> CLR_WHITE, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">174</span>, <span style=\"color: #000000;\">224</span> <span style=\"color: #000000;\">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">IMAGE</span> <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\e</span>xit.bmp\"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> MsgYesNo<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Want to exit ?\"</span> <span style=\"color: #000000;\">&#41;</span>, oMetro:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>,<span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> METRO oMetro</div>[/code:1q325yyx]\n\ndá error: Error description: Error description: Error BASE/1005 Class: 'NIL' has no property: CARGO \n\nse retirar : oBtn:Cargo = RecNo() mostra bem os metrobutton mas quando clico num dá erro:\n\nError BASE/1003 Variable does not exist: SELF\n\nGracias", "time": "11:27", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-20", "forum": "All products support", "text": "Por favor compílalo usando /b al llamar a Harbour.exe y comprueba que te aparece en el fichero.PPO", "time": "11:32", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-20", "forum": "All products support", "text": "obrigado, o .ppo aparece assim, estou compilando com buildx.bat do samples:\n[code=fw:9mrnfskq]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> oMetro := TMetro<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"My FWH Metro app\"</span>,,, <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\h</span>ires<span style=\"color: #000000;\">\\e</span>arth.bmp\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; DBSELECTAREA<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; NET_USE <span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"F_REG.DBF\"</span>, <span style=\"color: #000000;\">3</span>,.T.<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp;<span style=\"color: #00C800;\">while</span> ! Eof<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBtn := oMetro:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">16777215</span>, <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">174</span> * <span style=\"color: #000000;\">256</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">224</span> * <span style=\"color: #000000;\">65536</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, .F., <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span>, <span style=\"color: #000000;\">&#123;</span>||ShowRecords<span style=\"color: #000000;\">&#40;</span>::<span style=\"color: #000000;\">Cargo</span> <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">Cargo</span> :=RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;end<br />&nbsp; &nbsp;oMetro:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Exit\"</span>, <span style=\"color: #000000;\">16777215</span>, <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">174</span> * <span style=\"color: #000000;\">256</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">224</span> * <span style=\"color: #000000;\">65536</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, .F., <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\e</span>xit.bmp\"</span>, <span style=\"color: #000000;\">&#123;</span>||If<span style=\"color: #000000;\">&#40;</span> MsgYesNo<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Want to exit ?\"</span> <span style=\"color: #000000;\">&#41;</span>, oMetro:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>,<span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oMetro:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span></div>[/code:9mrnfskq]", "time": "12:05", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-20", "forum": "All products support", "text": "En el .ppo debería aparecer esto:\n\n{| Self |ShowRecords(::Cargo )}\n\nHas modificado el fichero metro.ch como te indiqué ?", "time": "14:18", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-20", "forum": "All products support", "text": "Desculpa Antonio Linares, o metro.ch estava errado , mas continua com o mesmo erro Error description: Error BASE/1005 Class: 'NIL' has no property: CARGO\n .ppo esta:\n\n[code=fw:2dq1478z]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> &nbsp; oMetro := TMetro<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"My FWH Metro app\"</span>,,, <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\h</span>ires<span style=\"color: #000000;\">\\e</span>arth.bmp\"</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; DBSELECTAREA<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; NET_USE <span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"F_REG.DBF\"</span>, <span style=\"color: #000000;\">3</span>,.T.<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp;<span style=\"color: #00C800;\">while</span> ! Eof<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBtn := oMetro:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">16777215</span>, <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">174</span> * <span style=\"color: #000000;\">256</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">224</span> * <span style=\"color: #000000;\">65536</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, .F., <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span>, <span style=\"color: #000000;\">&#123;</span>| <span style=\"color: #00C800;\">Self</span> |ShowRecords<span style=\"color: #000000;\">&#40;</span>::<span style=\"color: #000000;\">Cargo</span> <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">Cargo</span> :=RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;end<br />&nbsp; &nbsp;oMetro:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Exit\"</span>, <span style=\"color: #000000;\">16777215</span>, <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">174</span> * <span style=\"color: #000000;\">256</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">224</span> * <span style=\"color: #000000;\">65536</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, .F., <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\e</span>xit.bmp\"</span>, <span style=\"color: #000000;\">&#123;</span>| <span style=\"color: #00C800;\">Self</span> |If<span style=\"color: #000000;\">&#40;</span> MsgYesNo<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Want to exit ?\"</span> <span style=\"color: #000000;\">&#41;</span>, oMetro:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>,<span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oMetro:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:2dq1478z]", "time": "14:31", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-20", "forum": "All products support", "text": "Please try this change and let me know what you get:\n\n[code=fw:1l1jz1u8]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> <span style=\"color: #00C800;\">while</span> ! Eof<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />      oBtn := oMetro:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">16777215</span>, <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">174</span> * <span style=\"color: #000000;\">256</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">224</span> * <span style=\"color: #000000;\">65536</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, .F., <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span>, <span style=\"color: #000000;\">&#123;</span>| <span style=\"color: #00C800;\">Self</span> |ShowRecords<span style=\"color: #000000;\">&#40;</span>::<span style=\"color: #000000;\">Cargo</span> <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />         <span style=\"color: #0000ff;\">MsgInfo</span><span style=\"color: #000000;\">&#40;</span> ValType<span style=\"color: #000000;\">&#40;</span> oBtn <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />         oBtn:<span style=\"color: #000000;\">Cargo</span> :=RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />      DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   end</div>[/code:1l1jz1u8]", "time": "14:36", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-20", "forum": "All products support", "text": "information : U\n\nError description: Error BASE/1005 Class: 'NIL' has no property: CARG", "time": "14:50", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-21", "forum": "All products support", "text": "Ola antonio,\n\nno forum fivewin brasil deram uma solução mas com dialog e button , não funciona com metro , veja:\n\n[url:4w7nxll0]http&#58;//fivewin&#46;com&#46;br/index&#46;php?/topic/24015-classe-metro/[/url:4w7nxll0]\n\nSaludos", "time": "16:18", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-21", "forum": "All products support", "text": "Master algo +- asi:\n\n[code=fw:56k0bfdp]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">FUNCTION</span> TESTEPRODU<span style=\"color: #000000;\">&#40;</span> oFld, _Folder, oPRODU, _LETRA, _INIPROD, _FIMPROD <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; MEMVAR OCTL, _oProdu<br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">PUBLIC</span> WPRODFOCO<br /><br />&nbsp; &nbsp; oCtl := oFld:<span style=\"color: #000000;\">aDialogs</span><span style=\"color: #000000;\">&#91;</span>_Folder<span style=\"color: #000000;\">&#93;</span>:<span style=\"color: #000000;\">oCtlFocus</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">WHILE</span> _INIPROD <= _FIMPROD<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; SYSREFRESH<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; _oProdu := oProdu+STRZERO<span style=\"color: #000000;\">&#40;</span>_INIPROD,<span style=\"color: #000000;\">2</span>,<span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span>+_LETRA<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">IF</span> <span style=\"color: #000000;\">&#40;</span>oCtl:<span style=\"color: #000000;\">hWnd</span> = &_oProdu:<span style=\"color: #000000;\">hWnd</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WPRODFOCO := _INIPROD<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">ENDIF</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; _INIPROD = _INIPROD + <span style=\"color: #000000;\">1</span><br /><br />&nbsp; &nbsp; <span style=\"color: #00C800;\">ENDDO</span><br /><br /><span style=\"color: #00C800;\">RETURN</span><span style=\"color: #000000;\">&#40;</span> .T. <span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:56k0bfdp]", "time": "16:35", "topic": "Classe Metro", "username": "karinha" } ]
Classe Metro
[ { "date": "2015-05-21", "forum": "All products support", "text": "Joao,\n\nQue versión de FWH usas ?", "time": "20:20", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-21", "forum": "All products support", "text": "12.07", "time": "22:49", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Joao,\n\nPlease check in FWH\\source\\classes\\metropnl.prg if Method AddButton() returns oBtn:\n\n[code=fw:2kdwuy35]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00C800;\">METHOD</span> AddButton<span style=\"color: #000000;\">&#40;</span> lLarge, nGroup, cCaption, bAction, nClrText, nClrPane, cImgName, oFont, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nAlign, nBmpAlign, nBmpWidth, nBmpHeight, cText, nTextAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTextFont, oSubMetro, cBackImage, cAction, cSub <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oBtn<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nX := ::<span style=\"color: #000000;\">nMetroMargin</span> + <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nRow</span> * <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> + <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nY := ::<span style=\"color: #000000;\">nMetroTop</span> + <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nCol</span> * <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> + <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> lLarge := .F.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> nClrText := CLR_WHITE, nClrPane := NextClr<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oBtn &nbsp;:= TMetroBtn<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> nX, nY, lLarge, <span style=\"color: #00C800;\">Self</span>, cCaption, cImgName, bAction, nAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBmpAlign, nBmpWidth, nBmpHeight, oFont, cText, nTextAlign, oTextFont, oSubMetro, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nGroup, cBackImage, cAction, cSub <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nClrText, nClrPane <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">nClrCaption</span> &nbsp;:= nClrText<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> cBackImage <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'C'</span> .and. File<span style=\"color: #000000;\">&#40;</span> cBackImage <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style=\"color: #000000;\">SetBackGround</span><span style=\"color: #000000;\">&#40;</span> cBacKImage <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;AAdd<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">aButtons</span>, oBtn <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nCol</span>++<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lLarge<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nCol</span>++<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nCol</span> > <span style=\"color: #000000;\">5</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nRow</span>++<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nCol</span> = <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> oBtn<br />&nbsp;</div>[/code:2kdwuy35]", "time": "08:42", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Gracias Antonio , si addbutton return obtn , fontes:\n\nteste.prg :\n[code=fw:1ora3fu4]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"metropnl.ch\"</span><br /><br /><span style=\"color: #00C800;\">static</span> oMetro, oMetro1, oMetro2, oMetro3, lMetro<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span>, oTools, oSBtn<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">6</span><span style=\"color: #000000;\">&#93;</span>, oFont1, oFont2, oBigfont<br /><span style=\"color: #00C800;\">static</span> nClrBack &nbsp; := CLR_GREEN, aRect<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">&#93;</span>, nPanel := <span style=\"color: #000000;\">1</span><br /><span style=\"color: #00C800;\">static</span> lMainBar := .F., lSubBar := .F., c_Path, c_Path1, oMainBar, oSubBar, nWColorT := <span style=\"color: #000000;\">0</span><br /><span style=\"color: #00C800;\">static</span> nWStyle := <span style=\"color: #000000;\">4</span>, nWColorF := <span style=\"color: #000000;\">16443068</span>, nWColorB := <span style=\"color: #000000;\">10899511</span>, nWGradPos := <span style=\"color: #000000;\">0.2</span><br /><span style=\"color: #00C800;\">static</span> lWDirect := .T., cWBrush := <span style=\"color: #ff0000;\">\"BluStone.Bmp\"</span>, cWImage := <span style=\"color: #ff0000;\">\"Fantasy2.Jpg\"</span><br /><br /><span style=\"color: #00C800;\">FUNCTION</span> MAIN<span style=\"color: #000000;\">&#40;</span> cParam <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">LOCAL</span> oWnd, oBar, oBrush<br /><span style=\"color: #00C800;\">LOCAL</span> cTitle := <span style=\"color: #ff0000;\">\"CATALOGO VINHOS \"</span><br /><br />&nbsp; &nbsp;SET DELETED <span style=\"color: #0000ff;\">ON</span><br />&nbsp; &nbsp;SET SOFTSEEK OFF<br />&nbsp; &nbsp;SET EPOCH <span style=\"color: #0000ff;\">TO</span> <span style=\"color: #000000;\">1950</span><br />&nbsp; &nbsp;SET DATE FORMAT <span style=\"color: #ff0000;\">\"dd/mm/yyyy\"</span><br /><br />oFont1 := TFont<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"Arial\"</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-16</span>,.F.,.T.,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,.F. <span style=\"color: #000000;\">&#41;</span><br />oFont2 := TFont<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"Arial\"</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-25</span>,.F.,.T.,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,.F. <span style=\"color: #000000;\">&#41;</span><br />oBigFont := TFont<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"Arial\"</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-38</span>,.F.,.T.,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,.F. <span style=\"color: #000000;\">&#41;</span><br />oSmallFont := TFont<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"Arial\"</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-12</span>,.F.,.T.,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span>,.F. <span style=\"color: #000000;\">&#41;</span><br /><br />aRect<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">3</span><span style=\"color: #000000;\">&#93;</span> := GetSysmetrics<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> - <span style=\"color: #000000;\">25</span> <span style=\"color: #B900B9;\">// Screen-Height</span><br />aRect<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">4</span><span style=\"color: #000000;\">&#93;</span> := GetSysmetrics<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #B900B9;\">// Screen-Width</span><br /><br />c_path := cFilePath<span style=\"color: #000000;\">&#40;</span>GetModuleFileName<span style=\"color: #000000;\">&#40;</span> GetInstance<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #B900B9;\">// lChDir( \"../\" ) // needed starting from a subdirectory</span><br />c_path1 := c_path + <span style=\"color: #ff0000;\">\"Bitmaps<span style=\"color: #000000;\">\\\"</span><br />c_path2 := c_path + \"</span><span style=\"color: #0000ff;\">Bitmaps</span>\\Hires\\<span style=\"color: #ff0000;\">\"<br />c_path3 := c_path + \"</span><span style=\"color: #0000ff;\">Bitmaps</span>\\AlphaBmp\\<span style=\"color: #ff0000;\">\"<br />c_path4 := c_path + \"</span><span style=\"color: #0000ff;\">Bitmaps</span>\\Metro\\<span style=\"color: #ff0000;\">\"<br /><br />lMetro[1] := .F.<br />lMetro[2] := .F.<br />lMetro[3] := .F.<br /><br />REQUEST DBFCDX<br /><br />IF FILE( c_Path + \"</span>F_REG.DBF<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; DBSELECTAREA( 1 )<br />&nbsp; &nbsp; NET_USE (c_Path + \"</span>F_REG.DBF<span style=\"color: #ff0000;\">\", 3,.T.)<br />ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; MSGALERT(\"</span>ARQUIVO REGIÕES INEXISTENTE<span style=\"color: #ff0000;\">\",\"</span>Atenção<span style=\"color: #ff0000;\">\")<br />ENDIF<br /><br />DEFINE WINDOW oWnd TITLE cTitle STYLE nOr( WS_POPUP, WS_MAXIMIZE );<br />COLOR 255, CLR_GREEN<br /><br />oMetro1 := MakeMetroPanel( oWnd )<br /><br />oMetro1:bRClicked := { |Row,Col,f,o| IIF( lSubBar = .F., MAIN_MOVE() , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;( oSubBar:End(), MAIN_MOVE() ) ) }<br /><br />ACTIVATE WINDOW oWnd MAXIMIZED ;<br />ON INIT ( STARTUP(oMetro1,1), ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMetro1:Show(), ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oWnd:Move( 0, 0, aRect[4], aRect[3], .f. ) ) // Top, left, width, height<br /><br />oFont1:End()<br />oFont2:End()<br />oBigFont:End()<br />oSmallFont:End()<br /><br />RETURN NIL<br />//----------------------------------------------------------------------------//<br /><br />STATIC FUNCTION MAKEMETROPANEL( oWnd )<br />local oMetro1, oBtn,cnt:=0,oBt[50],nRec[20],aNReg:={},aCReg:={},NBTNPOS,octl<br /><br />DEFINE METROPANEL oMetro1 OF oWnd TITLE \"</span>Catálogo de Vinhos<span style=\"color: #ff0000;\">\" ;<br />ON CLICK oWnd:End()<br /><br />oMetro1:lDesignMode := .t.<br />lMetro[1] := .T.<br />DBSELECTAREA(1)<br />DBGOTOP()<br /><br />while !eof()<br />&nbsp; &nbsp; &nbsp; DEFINE METROBUTTON oBtn OF oMetro1 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PROMPT FieldGet( 1 ) COLOR CLR_WHITE, RGB( 2, 174, 224 ) ; &nbsp;// 1 primer campo<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IMAGE \"</span>..\\<span style=\"color: #0000ff;\">bitmaps</span>\\metro\\files.bmp<span style=\"color: #ff0000;\">\" ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ACTION ShowRecords( ::Cargo )<br />&nbsp; &nbsp; &nbsp; oBtn:Cargo := RecNo()<br />&nbsp; &nbsp; &nbsp; DbSkip()<br />end<br /><br /><br />DEFINE METROBUTTON oBt OF oMetro1 ;<br />COLOR &nbsp; CLR_WHITE,RGB( 255, &nbsp;0, &nbsp;66 ) ;<br />CAPTION &nbsp; \"</span>Exit<span style=\"color: #ff0000;\">\" ;<br />ALIGN &nbsp; \"</span>TOPRIGHT<span style=\"color: #ff0000;\">\" ;<br />GROUP &nbsp; 2 ;<br />BITMAP &nbsp; c_path4 + \"</span>exit.bmp<span style=\"color: #ff0000;\">\" ;<br />BMPALIGN &nbsp; \"</span>BOTTOMLEFT<span style=\"color: #ff0000;\">\" ;<br />SIZE &nbsp; 48, 48 ;<br />ACTION &nbsp; If( MsgYesNo( \"</span>Want <span style=\"color: #0000ff;\">to</span> exit ?<span style=\"color: #ff0000;\">\" ), oWnd:End(),)<br /><br /><br /><br />RETURN oMetro1<br /><br />FUNCTION ShowRecords()<br />&nbsp; //aqui preciso saber o recno() para fazer o filtro do artigos.dbf e mostrar em metrobutton<br />RETURN &nbsp;NIL<br /><br />// --------------------------<br /><br />FUNCTION STARTUP(oMetro,nPanel)<br /><br />DBSELECTAREA(1)<br />DBGOTO(nPanel)<br /><br />oMetro:SetColor( nWColorT, &nbsp;)<br />IF nWStyle = 1 // Color<br />&nbsp; &nbsp; D_BACKGRD( oMetro, 1, nWColorF )<br />ELSEIF nWStyle = 2 // Gradient<br />&nbsp; &nbsp; D_BACKGRD( oMetro, 2, nWColorF, nWColorB, nWGradPos, lWDirect )<br />ELSEIF nWStyle = 3 // BRUSH<br />&nbsp; &nbsp; D_BACKGRD( oMetro, 3, , , , , c_path1 + cWBrush )<br />ELSEIF nWStyle = 4 // Image<br />&nbsp; &nbsp; D_BACKGRD( oMetro, 4, , , , , , c_path2 + cWImage )<br />ENDIF<br /><br />RETURN( NIL )<br />// ----------------------------------------------------------------------------<br /><br />FUNCTION MAIN_MOVE()<br />LOCAL nStepL := 0, nLPos := aRect[4]<br /><br />IF lMainBar = .F. &nbsp;// Move IN<br />&nbsp; &nbsp; DO WHILE .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; nStepL := nStepL + 6<br />&nbsp; &nbsp; &nbsp; &nbsp; IF nStepL > &nbsp;100<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; INKEY(0.02)<br />&nbsp; &nbsp; &nbsp; &nbsp; nLPos := aRect[4] - nStepL<br />&nbsp; &nbsp; &nbsp; &nbsp; oMainBar:Move( 0, nLPos, , aRect[3], .f. ) // Top, left, width, height<br />&nbsp; &nbsp; ENDDO<br />&nbsp; &nbsp; lMainBar = .T.<br />ELSE<br />&nbsp; &nbsp; DO WHILE .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; nStepL := nStepL + 6<br />&nbsp; &nbsp; &nbsp; &nbsp; IF nStepL > &nbsp;100<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; INKEY(0.02)<br />&nbsp; &nbsp; &nbsp; &nbsp; nLPos := aRect[4] - 100 + nStepL<br />&nbsp; &nbsp; &nbsp; &nbsp; oMainBar:Move( 0, nLPos, , aRect[3], .f. ) // Top, left, width, height<br />&nbsp; &nbsp; ENDDO<br />&nbsp; &nbsp; lMainBar = .F.<br />ENDIF<br /><br />RETURN NIL<br /><br />// -------- &nbsp;WINDOW / DIALOG - Background ---------------<br /><br />FUNCTION D_BACKGRD( oDlg, nStyle, nColor1, nColor2, nMove, lDirect, cBrush, cImage )<br />LOCAL oBrush, hDC, aGrad, oImage<br />LOCAL aRect := GETCLIENTRECT( oDlg:hWnd )<br /><br />IF nStyle = 1 // COLOR<br />&nbsp; &nbsp; DEFINE BRUSH oBrush COLOR nColor1<br />&nbsp; &nbsp; oDlg:SetBrush( oBrush )<br />&nbsp; &nbsp; oBrush:End()<br />ENDIF<br />IF nStyle = 2 // GRADIENT Brush<br />&nbsp; &nbsp; aGrad := { { nMove, nColor1, nColor2 }, { nMove, nColor2, nColor1 } }<br />&nbsp; &nbsp; hDC = CreateCompatibleDC( oDlg:GetDC() )<br />&nbsp; &nbsp; hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nWidth, oDlg:nHeight )<br />&nbsp; &nbsp; hBmpOld = SelectObject( hDC, hBmp )<br />&nbsp; &nbsp; GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, lDirect ) // .T: = Vertical<br />&nbsp; &nbsp; DeleteObject( oDlg:oBrush:hBrush )<br />&nbsp; &nbsp; oBrush := TBrush():New( ,,,, hBmp )<br />&nbsp; &nbsp; oBrush:Cargo &nbsp;:= aGrad<br />&nbsp; &nbsp; SelectObject( hDC, hBmpOld )<br />&nbsp; &nbsp; ReleaseDC(hDC)<br />&nbsp; &nbsp; oDlg:SetBrush( oBrush )<br />&nbsp; &nbsp; oBrush:End()<br />ENDIF<br />IF nStyle = 3 // BMP-BRUSH<br />&nbsp; &nbsp; DEFINE BRUSH oBrush FILE &nbsp;cBrush<br />&nbsp; &nbsp; oDlg:SetBrush( oBrush )<br />&nbsp; &nbsp; oBrush:End()<br />ENDIF<br />IF nStyle = 4 // Image ADJUSTED<br />&nbsp; &nbsp; IF FILE( cImage )<br />&nbsp; &nbsp; &nbsp; &nbsp; DEFINE IMAGE oImage FILE cImage<br />&nbsp; &nbsp; &nbsp; &nbsp; oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, &nbsp;aRect[4], aRect[3], .T. ) )<br />&nbsp; &nbsp; &nbsp; &nbsp; oImage:End()<br />&nbsp; &nbsp; &nbsp; &nbsp; oDlg:SetBrush( oBrush )<br />&nbsp; &nbsp; &nbsp; &nbsp; oBrush:End()<br />&nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; IF !EMPTY(cImage)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgAlert( \"</span>File : <span style=\"color: #ff0000;\">\" + cImage + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"</span>does not exist<span style=\"color: #ff0000;\">\" + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"</span><span style=\"color: #0000ff;\">to</span> show <span style=\"color: #0000ff;\">Image</span> !<span style=\"color: #ff0000;\">\", \"</span>ATTENTION<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDIF<br />ENDIF<br /><br />RETURN( NIL )<br /><br />// ---------- NET - FUNCTIONS ----------------------------<br /><br />FUNCTION NET_USE ( cDBName1, ntrials, net)<br /><br />LOCAL lReturn &nbsp;:= .T.<br />LOCAL lOpen &nbsp; &nbsp;:= .F.<br />LOCAL close := 1<br /><br />ntrcount &nbsp; := ntrials<br />JaNein &nbsp; &nbsp;:= .F.<br /><br />// SHARED &nbsp; &nbsp;all Users<br />// EXCLUSIVE &nbsp;1 User<br /><br />IF File( cDBName1 )<br />&nbsp; &nbsp; ntrials := ntrcount<br />&nbsp; &nbsp; DO WHILE !lOpen<br />&nbsp; &nbsp; &nbsp; &nbsp; close := 2<br />&nbsp; &nbsp; &nbsp; &nbsp; DO WHILE .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF !net<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; USE &cDBName1 EXCLUSIVE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; USE &cDBName1 SHARED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF !NetErr()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF net = .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status := \"</span>SHARED<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status := \"</span>EXCLUSIVE<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ntrcount = ntrials<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xName := WNetGetUser()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF MsgYesNo( \"</span>Open <span style=\"color: #ff0000;\">\" + status + \"</span> &nbsp;<span style=\"color: #0000ff;\">of</span> <span style=\"color: #ff0000;\">\" + upper(cDBName1) + \"</span> not possible !<span style=\"color: #ff0000;\">\" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"</span> <span style=\"color: #00C800;\">try</span> again ?<span style=\"color: #ff0000;\">\", \"</span>Network-error -> &xName !<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := ntrcount<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JaNein &nbsp; &nbsp;:= .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JaNein &nbsp; &nbsp;:= .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF JaNein = .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials --<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ntrials > 0 .AND. ntime > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_WAIT ( ntrcount, ntrials, ntime)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ntrials = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := ntrcount<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ntrials = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDDO<br />&nbsp; &nbsp; ENDDO<br />ELSE<br />&nbsp; &nbsp; nMsgBox (\"</span>File -> <span style=\"color: #ff0000;\">\" + cDBName1 + \"</span> is missing !<span style=\"color: #ff0000;\">\", \"</span>Attention !<span style=\"color: #ff0000;\">\")<br />&nbsp; &nbsp; SET RESOURCES to<br />&nbsp; &nbsp; set _3DLOOK OFF<br />&nbsp; &nbsp; FreeLibrary()<br />&nbsp; &nbsp; close database<br />&nbsp; &nbsp; QUIT<br />ENDIF<br /><br />RETURN lReturn<br /><br />//-------------------------------------------------------<br /><br />FUNCTION NET_RLOCK( ntrials, ntime )<br /><br />LOCAL &nbsp; lReturn &nbsp; := .F.<br />LOCAL &nbsp; ntrcount &nbsp; := 0<br />LOCAL &nbsp; nZSek &nbsp; &nbsp; := 0<br />ntrcount := ntrials<br />DO WHILE !lReturn<br />&nbsp; &nbsp; DO WHILE ntrials > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; IF !RLock()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials --<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ntrials > 0 .AND. ntime > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_WAIT ( ntrcount, ntrials, ntime )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDDO<br />&nbsp; &nbsp; IF ntrials = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; IF MsgYesNo( \"</span>Not possible, <span style=\"color: #0000ff;\">to</span> lock the record !<span style=\"color: #ff0000;\">\" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"</span> <span style=\"color: #00C800;\">Try</span> again ?<span style=\"color: #ff0000;\">\", \"</span>Network Error !<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; &nbsp; :=.T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := ntrcount<br />&nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDIF<br />ENDDO<br />IF lReturn = .F.<br />&nbsp; &nbsp; nMsgBox (\"</span>Files are not saved !!!<span style=\"color: #ff0000;\">\", \"</span>Attention !<span style=\"color: #ff0000;\">\")<br />ENDIF<br /><br />RETURN lReturn<br /><br />//-------------------------------------------------------<br /><br />FUNCTION NET_ULOCK ()<br /><br />LOCAL &nbsp; lReturn &nbsp; := .F.<br />LOCAL &nbsp; ntrcount &nbsp; := 0<br />LOCAL &nbsp; nZSek &nbsp; &nbsp; := 0<br /><br />IF len(fieldname(1)) > 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&& DB offen ?<br />&nbsp; &nbsp; UNLOCK &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; && ja<br />ENDIF<br /><br />RETURN lReturn<br /><br />// ----------------------<br /><br />FUNCTION NET_CLOSE(ntrials, ntime, net)<br /><br />LOCAL lReturn &nbsp;:= .T.<br />LOCAL lOpen &nbsp; &nbsp;:= .F.<br />LOCAL close := 1<br /><br />ntrcount &nbsp; := ntrials<br />JaNein &nbsp; &nbsp;:= .F.<br />JaNein &nbsp; &nbsp;:= .F.<br /><br />cDBName1 := DBF()<br /><br />DO WHILE !lOpen<br />&nbsp; &nbsp; close := 1<br />&nbsp; &nbsp; DO WHILE ntrials > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; USE<br />&nbsp; &nbsp; &nbsp; &nbsp; IF NetErr()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials --<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF MsgYesNo( \"</span>Close <span style=\"color: #0000ff;\">of</span> file : <span style=\"color: #ff0000;\">\" + upper(cDBName1) + \"</span> not possible !<span style=\"color: #ff0000;\">\" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"</span> <span style=\"color: #00C800;\">Try</span> again ?<span style=\"color: #ff0000;\">\", \"</span>Network-Error !<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen :=.T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := ntrcount<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ntrials > 0 .AND. ntime > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_WAIT ( ntrcount, ntrials, ntime)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; geschloss := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := 0<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDDO<br />ENDDO<br /><br />RETURN lReturn<br /><br />// --------------------------------------------<br /><br />FUNCTION NET_WAIT ( ntrcount, ntrials, ntime )<br /><br />local oMeter, oText1<br /><br />MsgMeter( { | oMeter, oText1 | ;<br />SHOW_WAIT(ntrcount, ntrials, ntime, oMeter, oText1) } , ;<br />\"</span>rest trials : <span style=\"color: #ff0000;\">\" + ltrim(str(ntrials)) + \"</span>. trial...<span style=\"color: #ff0000;\">\" )<br /><br />RETURN nil<br /><br />//----------------------------------------------------------------------------//<br /><br />STATIC FUNCTION SHOW_WAIT(ntrcount, ntrials, ntime, oMeter, oText1)<br /><br />oMeter:nTotal = ntrcount<br />nZSek := Seconds()<br />oText1:SetText( \"</span>rest <span style=\"color: #0000ff;\">of</span> trials : <span style=\"color: #ff0000;\">\" + ltrim(str(ntrials)))<br />oMeter:Set( ntrials )<br />SysRefresh()<br />DO WHILE Seconds() < nZSek + ntime<br />ENDDO<br /><br />RETURN nil<br /><br />// -------------------------------------<br /><br />FUNCTION NET_DELETE ( nSeconds )<br /><br />LOCAL lReturn := .F.<br />LOCAL ntrcount := 0<br />LOCAL cDatabase := DBF()<br /><br />ntrcount := &nbsp;nSeconds<br /><br />DO WHILE !lReturn<br />&nbsp; &nbsp; DO WHILE &nbsp;nSeconds > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; IF !RLock()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nSeconds --<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF &nbsp;nSeconds > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_WAIT ( &nbsp;nSeconds )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DELETE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDDO<br />&nbsp; &nbsp; IF &nbsp;nSeconds = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; IF MsgYesNo( \"</span>Not possible <span style=\"color: #0000ff;\">to</span> delete a Record <span style=\"color: #0000ff;\">of</span><span style=\"color: #ff0000;\">\" + upper(cDatabase) + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\"</span> <span style=\"color: #00C800;\">try</span> again ?<span style=\"color: #ff0000;\">\", \"</span>Network-Error !<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nSeconds := ntrcount<br />&nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDIF<br />ENDDO<br />if lReturn = .F.<br />&nbsp; &nbsp; MsgAlert(\"</span>The Record is not deleted !!!<span style=\"color: #ff0000;\">\", \"</span>Attention !<span style=\"color: #ff0000;\">\")<br />endif<br /><br />RETURN lReturn<br /><br />// ----------------------------------------------<br /><br />FUNCTION NET_APPEND ( ntrials, ntime )<br /><br />LOCAL &nbsp; lReturn := .F.<br />LOCAL &nbsp; ntrcount := 0<br />LOCAL &nbsp; nZSek &nbsp; := 0<br /><br />ntrcount := ntrials<br /><br />DO WHILE !lReturn<br />&nbsp; &nbsp; DO WHILE ntrials > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; DBAppend()<br />&nbsp; &nbsp; &nbsp; &nbsp; IF NetErr()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials --<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IF ntrials > 0 .AND. ntime > 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_WAIT ( ntrcount, ntrials, ntime )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn := .T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDDO<br />&nbsp; &nbsp; IF ntrials = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; IF MsgYesNo( \"</span>Append in : <span style=\"color: #ff0000;\">\" + upper(cDBName) + \"</span> not possible !<span style=\"color: #ff0000;\">\" + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"</span> <span style=\"color: #00C800;\">Try</span> again ?<span style=\"color: #ff0000;\">\", \"</span>Network Error !<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; &nbsp; :=.T.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ntrials := ntrcount<br />&nbsp; &nbsp; &nbsp; &nbsp; ELSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReturn := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lOpen &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXIT<br />&nbsp; &nbsp; &nbsp; &nbsp; ENDIF<br />&nbsp; &nbsp; ENDIF<br />ENDDO<br />if lReturn = .F.<br />&nbsp; &nbsp; nMsgBox ( \"</span>No Record appended !!!<span style=\"color: #ff0000;\">\", \"</span>Attention !<span style=\"color: #ff0000;\">\")<br />endif<br /><br />RETURN lReturn<br /><br />// ----------------------------------------<br />// --------- DBF Array ----------------<br /><br />STATIC FUNCTION NEW_DBF()<br />LOCAL DBFARRAY := {}<br /><br />AADD(DBFARRAY, { \"</span>CODIGO<span style=\"color: #ff0000;\">\",&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"</span>C<span style=\"color: #ff0000;\">\", &nbsp;2, 0 })<br />AADD(DBFARRAY, { \"</span>N_FAM<span style=\"color: #ff0000;\">\",&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \"</span>C<span style=\"color: #ff0000;\">\", 250, 0 })<br /><br />cDbfName := c_Path + \"</span>F_REG.DBF<span style=\"color: #ff0000;\">\"<br /><br />DELETE FILE &cDbfName<br /><br />IF LEN(DBFARRAY) == 0<br />&nbsp; &nbsp; MsgInfo( \"</span>DBF Structure-Error<span style=\"color: #ff0000;\">\", \"</span><span style=\"color: #00C800;\">New</span> Structure<span style=\"color: #ff0000;\">\" )<br />&nbsp; &nbsp; RETURN NIL<br />ENDIF<br /><br />DBCREATE( cDbfName, DBFARRAY )<br />// DbCreate(cDir+'CL',{ {aClienti[1],aClienti[2],aClienti[3],aClienti[4]}} , 'DBFCDX')<br /><br />DBSELECTAREA( 1 )<br />NET_USE (c_Path + \"</span>F_REG.DBF<span style=\"color: #ff0000;\">\", 3,.T.)<br /><br />NET_APPEND ( 3, 3 )<br />IF NET_RLOCK( 5, 5 )<br />&nbsp; &nbsp; (1)->CODIGO := &nbsp;\"</span>DOURO<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; (1)->NOME &nbsp; := &nbsp;\"</span>REGIÃO <span style=\"color: #00C800;\">DO</span> DOURO<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; NET_ULOCK()<br />ENDIF<br />NET_APPEND ( 3, 3 )<br />IF NET_RLOCK( 5, 5 )<br />&nbsp; &nbsp; (1)->CODIGO := &nbsp;\"</span>ALENTEJO<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; (1)->NOME &nbsp; := &nbsp;\"</span>REGIÃO <span style=\"color: #00C800;\">DO</span> ALENTEJO<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; NET_ULOCK()<br />ENDIF<br />NET_APPEND ( 3, 3 )<br />IF NET_RLOCK( 5, 5 )<br />&nbsp; &nbsp; (1)->CODIGO := &nbsp;\"</span>LISBOA<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; (1)->NOME &nbsp; := &nbsp;\"</span>REGIÃO DE LISBOA<span style=\"color: #ff0000;\">\"<br />&nbsp; &nbsp; NET_ULOCK()<br />ENDIF<br /><br />COMMIT<br />DBGOTOP()<br />NET_CLOSE ( 3,5,.T.)<br /><br />IF File( cDbfName )<br />&nbsp; &nbsp; MsgInfo( \"</span>Novo DBF Criado! <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\" + ALLTRIM(STR(LEN(DBFARRAY))) + \"</span> registos <span style=\"color: #000000;\">&#41;</span><span style=\"color: #ff0000;\">\", \"</span>Nova Estrutura<span style=\"color: #ff0000;\">\" )<br />ELSE<br />&nbsp; &nbsp; MsgAlert( \"</span>Não consiguiu criar novo ficheiro!<span style=\"color: #ff0000;\">\",\"</span>Projecto-Ficheiro<span style=\"color: #ff0000;\">\")<br />ENDIF<br /><br />RETURN NIL<br /><br /></span></div>[/code:1ora3fu4]\n\nmetropnl.ch \n[code=fw:1ora3fu4]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">/*<br />*<br />* &nbsp; MetroPnl.ch<br />*<br />*<br />*/</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><br />#ifndef DT_TOP<br /><span style=\"color: #00D7D7;\">#define</span> DT_TOP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">0</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_LEFT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">0</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_CENTER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">1</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_RIGHT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">2</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_VCENTER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">4</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_BOTTOM &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">8</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_WORDBREAK &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">16</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_SINGLELINE &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">32</span><br /><span style=\"color: #00D7D7;\">#define</span> DT_CALCRECT &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">1024</span><br />#endif<br /><br />#xcommand <span style=\"color: #0000ff;\">DEFINE</span> METROPANEL <oMetro> <span style=\"color: #0000ff;\">OF</span> <oWnd> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">TITLE</span> <cTitle> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">COLOR</span> <nClrText>, <nClrPane> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> TILESIZE <nSize> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">CLICK</span> <uAction> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> SCROLLBARCOLOR <nClrThumb>, <nClrScroll> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <oMetro> := TMetroPanel<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <oWnd>, <cTitle>, <nClrText>, <nClrPane>, <<span style=\"color: #000000;\">&#123;</span>uAction<span style=\"color: #000000;\">&#125;</span>>, <nSize>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<nClrThumb>, <nClrScroll> <span style=\"color: #000000;\">&#41;</span><br /><br />#xcommand <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON <span style=\"color: #000000;\">&#91;</span><oBtn><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">OF</span> <oMetro> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <prmt:<span style=\"color: #0000ff;\">PROMPT</span>,CAPTION> <cPrompt> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">COLOR</span> <nClrText>, <nClrPane> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> ALIGN <nAlign> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">FONT</span> &nbsp;<oFont> &nbsp;<span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> GROUP <nGroup> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">MENU</span> <oSub> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <bmp:<span style=\"color: #000000;\">BITMAP</span>,IMAGE> <cImgName> <span style=\"color: #000000;\">&#91;</span> BMPALIGN <nBmpAlign> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">SIZE</span> <nBmpWidth>,<nBmpHeight> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> BACKGROUND <cImage> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <large: <span style=\"color: #000000;\">LARGE</span>> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <txt:<span style=\"color: #000000;\">BODY</span>,BODYTEXT,TEXT> <cText> <span style=\"color: #000000;\">&#91;</span> TEXTALIGN <nTextAlign> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#91;</span> TEXTFONT <oTextFont> <span style=\"color: #000000;\">&#93;</span> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <span style=\"color: #0000ff;\">ACTION</span> <uAction,...> <span style=\"color: #000000;\">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">&#91;</span> <oBtn> := <span style=\"color: #000000;\">&#93;</span> <oMetro>:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> <.large.>, <nGroup>, <cPrompt>, <span style=\"color: #000000;\">&#91;</span><<span style=\"color: #000000;\">&#123;</span>uAction<span style=\"color: #000000;\">&#125;</span>><span style=\"color: #000000;\">&#93;</span>, <nClrText>, <nClrPane>, &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<cImgName>, <oFont>, <nAlign>, <nBmpAlign>, <nBmpWidth>, <nBmpHeight>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<cText>, <nTextAlign>, <oTextFont>, <oSub>, <cImage>, <<span style=\"color: #ff0000;\">\"uAction\"</span>>, <<span style=\"color: #ff0000;\">\"oSub\"</span>> <span style=\"color: #000000;\">&#41;</span><br /><br />#xcommand ADD <span style=\"color: #000000;\">&#91;</span><oBtn><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">TO</span> METRO <oMetro> <span style=\"color: #000000;\">&#91;</span><clauses,...><span style=\"color: #000000;\">&#93;</span> => ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON <span style=\"color: #000000;\">&#91;</span><oBtn><span style=\"color: #000000;\">&#93;</span> <span style=\"color: #0000ff;\">OF</span> <oMetro> <span style=\"color: #000000;\">&#91;</span><clauses><span style=\"color: #000000;\">&#93;</span><br />&nbsp;</div>[/code:1ora3fu4]\n\nmetropnl.prg\n[code=fw:1ora3fu4]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #B900B9;\">/*<br />*<br />* &nbsp;MetroPnl.Prg<br />*<br />*/</span><br /><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"fivewin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"metropnl.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"hbcompat.ch\"</span> &nbsp;<span style=\"color: #B900B9;\">// important</span><br /><br /><span style=\"color: #B900B9;\">// CLASSES: TMetroPanel and TMetroBtn</span><br /><br /><span style=\"color: #00D7D7;\">#define</span> BTN_GAP &nbsp; &nbsp; &nbsp; <span style=\"color: #000000;\">8</span><br /><span style=\"color: #00D7D7;\">#define</span> GRP_GAP &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">32</span><br /><span style=\"color: #00D7D7;\">#define</span> SCRLB_HEIGHT <span style=\"color: #000000;\">20</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> oDragWnd<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMetroPanel <span style=\"color: #0000ff;\">FROM</span> TPanel<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered AS LOGICAL<br />&nbsp; &nbsp;CLASSDATA oActive &nbsp;<span style=\"color: #B900B9;\">// for internal use</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">//</span><br />&nbsp; &nbsp;CLASSDATA nBtnSize, nMetroRows, nMetroTop, nMetroMargin, nSliderTop<br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">//</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nOffset &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nScrollRange &nbsp; <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nScrollRatio &nbsp; <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;oFont, oFontB<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;oBtnFont, oTextFont<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nGroups &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;aButtons &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">INIT</span> Array<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">0</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;lArranged &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;lDesignMode &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nClrScroll<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nClrThumb<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nMetroWidth, nThumbSize, nThumbWidth<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nThumbPos &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">60</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;hPen<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;cTitle<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nRow, nCol<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;oParent<br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// lDrag, nDragRow, nOldCol used for metro sliding by dragging on screen or scrollbar</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;lDrag <span style=\"color: #0000ff;\">INIT</span> .F.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nDragRow<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nOldCol <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">0</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> &nbsp;nScrollBarTop<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> oWnd, cTitle, nClrText, nClrPane, bLClicked, nBtnSize, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nClrThumb, nClrScroll <span style=\"color: #000000;\">&#41;</span> CONSTRUCTOR<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #0000ff;\">Paint</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> AddButton<span style=\"color: #000000;\">&#40;</span> lLarge, nGroup, cCaption, bAction, nClrText, nClrPane, cImgName, oFont, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nAlign, nBmpAlign, nBmpWidth, nBmpHeight, cText, nTextAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oTextFont, oSubMetro, cBackImage <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> Show<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">INLINE</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">Arrange</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">ReSize</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #00C800;\">Self</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">lVisible</span> := .t. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> Hide<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">INLINE</span> <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">lVisible</span> := .f. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> Arrange<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> LButtonDown<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> LButtonUp<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> MouseMove<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> MoveBtn<span style=\"color: #000000;\">&#40;</span> oBtnDrag, oBtnOver <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> SwitchTo<span style=\"color: #000000;\">&#40;</span> oNext, lRight <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> MouseWheel<span style=\"color: #000000;\">&#40;</span> nKey, nDelta, nXPos, nYPos <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> Slide<span style=\"color: #000000;\">&#40;</span> nPixels <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> ProgramCode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> Destroy<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> oWnd, cTitle, nClrText, nClrPane, bLClicked, nBtnSize, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nClrThumb, nClrScroll <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> cTitle := <span style=\"color: #ff0000;\">\"Start\"</span>, nClrText := CLR_WHITE, nClrPane := CLR_GREEN<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">nBtnSize</span> &nbsp; &nbsp; &nbsp;:= IfNil<span style=\"color: #000000;\">&#40;</span> nBtnSize, <span style=\"color: #000000;\">132</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">nMetroRows</span> &nbsp; &nbsp;:= Int<span style=\"color: #000000;\">&#40;</span> GetSysMetrics<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> + BTN_GAP <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> - <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">nMetroTop</span> &nbsp; &nbsp; := ::<span style=\"color: #000000;\">nBtnSize</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">nMetroMargin</span> &nbsp;:= ::<span style=\"color: #000000;\">nBtnSize</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Super</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, GetSysMetrics<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> , GetSysMetrics<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span>, oWnd <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">cTitle</span> &nbsp; &nbsp; = cTitle<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nRow</span> &nbsp; &nbsp; &nbsp; = &nbsp; <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nCol</span> &nbsp; &nbsp; &nbsp; = &nbsp; <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nClrThumb</span> &nbsp;= nClrThumb<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nClrScroll</span> = nClrScroll<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">hPen</span> &nbsp; &nbsp; &nbsp; = CreatePen<span style=\"color: #000000;\">&#40;</span> PS_SOLID, <span style=\"color: #000000;\">2</span>, CLR_BLACK <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">nClrScroll</span> := RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">108</span>, <span style=\"color: #000000;\">110</span>, <span style=\"color: #000000;\">190</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">nClrThumb</span> &nbsp;:= RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">148</span>, <span style=\"color: #000000;\">150</span>, <span style=\"color: #000000;\">230</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> ::<span style=\"color: #000000;\">oFont</span> &nbsp;<span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI Light\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">-52</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> ::<span style=\"color: #000000;\">oFontB</span> <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI Light\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">-60</span> BOLD<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> ::<span style=\"color: #000000;\">oBtnFont</span> &nbsp;<span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI Light\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">-20</span> BOLD<br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> ::<span style=\"color: #000000;\">oTextFont</span> <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI Light\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">-16</span> BOLD<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">lVisible</span> &nbsp;:= .t.<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nClrText, nClrPane <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">bLClicked</span> &nbsp; &nbsp;:= bLClicked<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">oActive</span> == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">oActive</span> := <span style=\"color: #00C800;\">Self</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">bLClicked</span> := <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oParent</span> == <span style=\"color: #00C800;\">nil</span>,, ::<span style=\"color: #000000;\">SwitchTo</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oParent</span>, .t. <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">oClient</span> &nbsp; &nbsp;:= <span style=\"color: #00C800;\">Self</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #0000ff;\">Paint</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> aInfo<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oRect &nbsp; &nbsp;:= ::<span style=\"color: #000000;\">GetCliRect</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> hScrollBrush, hThumbBrush<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nBarTotal<br /><br />&nbsp; &nbsp;aInfo := ::<span style=\"color: #000000;\">DispBegin</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;FillRect<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">aRect</span>, ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">hBrush</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #0000ff;\">Say</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> - ::<span style=\"color: #000000;\">oFont</span>:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">2</span>, ::<span style=\"color: #000000;\">nMetroTop</span>, ::<span style=\"color: #000000;\">cTitle</span>,,, ::<span style=\"color: #000000;\">oFont</span>, .t., .t. <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nScrollRange</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; hScrollBrush &nbsp; &nbsp; &nbsp;:= CreateSolidBrush<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrScroll</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; hThumbBrush &nbsp; &nbsp; &nbsp; := CreateSolidBrush<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrThumb</span> &nbsp;<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nThumbWidth</span> &nbsp; &nbsp; := Int<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nThumbSize</span> * <span style=\"color: #000000;\">&#40;</span> oRect:<span style=\"color: #000000;\">nWidth</span> - <span style=\"color: #000000;\">120</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; nBarTotal &nbsp; &nbsp; &nbsp; &nbsp; := oRect:<span style=\"color: #000000;\">nWidth</span> - <span style=\"color: #000000;\">120</span> - ::<span style=\"color: #000000;\">nThumbWidth</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nThumbPos</span> &nbsp; &nbsp; &nbsp; := Int<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">Abs</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nOffSet</span> / ::<span style=\"color: #000000;\">nScrollRange</span> <span style=\"color: #000000;\">&#41;</span> * nBarTotal <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #000000;\">60</span><br />&nbsp; &nbsp; &nbsp; oRect:<span style=\"color: #000000;\">nTop</span> &nbsp; &nbsp; &nbsp; &nbsp;:= oRect:<span style=\"color: #000000;\">nBottom</span> - SCRLB_HEIGHT<br />&nbsp; &nbsp; &nbsp; oRect:<span style=\"color: #000000;\">nHeight</span> &nbsp; &nbsp; := SCRLB_HEIGHT<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nScrollBarTop</span> &nbsp; := oRect:<span style=\"color: #000000;\">nTop</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nScrollRatio</span> &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nScrollRange</span> / nBarTotal <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; FillRect<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">aRect</span>, hScrollBrush <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; FillRect<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, <span style=\"color: #000000;\">&#123;</span> oRect:<span style=\"color: #000000;\">nTop</span>, oRect:<span style=\"color: #000000;\">nLeft</span> + ::<span style=\"color: #000000;\">nThumbPos</span>, oRect:<span style=\"color: #000000;\">nBottom</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oRect:<span style=\"color: #000000;\">nLeft</span> + ::<span style=\"color: #000000;\">nThumbPos</span> + ::<span style=\"color: #000000;\">nThumbWidth</span> <span style=\"color: #000000;\">&#125;</span>, hThumbBrush <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DeleteObject<span style=\"color: #000000;\">&#40;</span> hScrollBrush <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DeleteObject<span style=\"color: #000000;\">&#40;</span> hThumbBrush <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; MoveTo<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">nLeft</span> + <span style=\"color: #000000;\">32</span>, oRect:<span style=\"color: #000000;\">nTop</span> + &nbsp;<span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; LineTo<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">nLeft</span> + <span style=\"color: #000000;\">24</span>, oRect:<span style=\"color: #000000;\">nTop</span> + <span style=\"color: #000000;\">10</span>, ::<span style=\"color: #000000;\">hPen</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; LineTo<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">nLeft</span> + <span style=\"color: #000000;\">32</span>, oRect:<span style=\"color: #000000;\">nTop</span> + <span style=\"color: #000000;\">16</span>, ::<span style=\"color: #000000;\">hPen</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; MoveTo<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">nRight</span> - <span style=\"color: #000000;\">32</span>, oRect:<span style=\"color: #000000;\">nTop</span> + &nbsp;<span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; LineTo<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">nRight</span> - <span style=\"color: #000000;\">24</span>, oRect:<span style=\"color: #000000;\">nTop</span> + <span style=\"color: #000000;\">10</span>, ::<span style=\"color: #000000;\">hPen</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; LineTo<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oRect:<span style=\"color: #000000;\">nRight</span> - <span style=\"color: #000000;\">32</span>, oRect:<span style=\"color: #000000;\">nTop</span> + <span style=\"color: #000000;\">16</span>, ::<span style=\"color: #000000;\">hPen</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nScrollBarTop</span> &nbsp; := oRect:<span style=\"color: #000000;\">nBottom</span> + <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bPainted</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">\"B\"</span><br />&nbsp; &nbsp; &nbsp; Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bPainted</span>, ::<span style=\"color: #000000;\">hDC</span>, ::<span style=\"color: #000000;\">cPS</span>, <span style=\"color: #00C800;\">Self</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">DispEnd</span><span style=\"color: #000000;\">&#40;</span> aInfo <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #000000;\">0</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> Arrange<span style=\"color: #000000;\">&#40;</span> lReArrange <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nGrpLeft &nbsp; &nbsp;:= ::<span style=\"color: #000000;\">nMetroMargin</span> + ::<span style=\"color: #000000;\">nOffset</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nGrpRight<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nGroup<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> aBtns, nBtns, oBtn, nCols<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nRow, nCol, n<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lReArrange == .t.<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">lArranged</span> := .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">lArranged</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">for</span> nGroup := <span style=\"color: #000000;\">1</span> <span style=\"color: #0000ff;\">to</span> ::<span style=\"color: #000000;\">nGroups</span><br />&nbsp; &nbsp; &nbsp; aBtns &nbsp; &nbsp; &nbsp; := <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; nBtns &nbsp; &nbsp; &nbsp; := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">for</span> each oBtn in ::<span style=\"color: #000000;\">aButtons</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oBtn:<span style=\"color: #000000;\">nGroup</span> == nGroup<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style=\"color: #000000;\">&#40;</span> aBtns, oBtn <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBtns++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> oBtn:<span style=\"color: #000000;\">lLarge</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBtns++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">next</span><br />&nbsp; &nbsp; &nbsp; nCols &nbsp; &nbsp; := Ceiling<span style=\"color: #000000;\">&#40;</span> nBtns / ::<span style=\"color: #000000;\">nMetroRows</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; nRow := nCol := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; nGrpRight &nbsp; &nbsp; &nbsp; &nbsp; := nGrpLeft<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">for</span> each oBtn in aBtns<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> oBtn:<span style=\"color: #000000;\">lLarge</span>, nCol + <span style=\"color: #000000;\">1</span>, nCol <span style=\"color: #000000;\">&#41;</span> > nCols<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nRow++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nCol &nbsp; &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">nTop</span> &nbsp; &nbsp; &nbsp;:= ::<span style=\"color: #000000;\">nMetroTop</span> &nbsp;+ nRow * <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> + BTN_GAP <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">nLeft</span> &nbsp; &nbsp; := nGrpLeft + nCol * <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> + BTN_GAP <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nGrpRight &nbsp; &nbsp; &nbsp;:= <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span> nGrpRight, oBtn:<span style=\"color: #000000;\">nLeft</span> + oBtn:<span style=\"color: #000000;\">nWidth</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCol++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oBtn:<span style=\"color: #000000;\">lLarge</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nCol++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">next</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nScrollRange</span> &nbsp; &nbsp;:= nGrpLeft - ::<span style=\"color: #000000;\">nMetroMargin</span> - ::<span style=\"color: #000000;\">nOffSet</span><br />&nbsp; &nbsp; &nbsp; nGrpLeft &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= nGrpRight + GRP_GAP<br />&nbsp; &nbsp; &nbsp; nGrpRight &nbsp; &nbsp; &nbsp; &nbsp; := nGrpLeft<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">next</span> nGroup<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nMetroWidth</span> &nbsp; &nbsp; := nGrpRight - ::<span style=\"color: #000000;\">nOffSet</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nScrollRange</span> &nbsp; &nbsp;:= <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nMetroWidth</span> - ScreenWidth<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">nScrollRange</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nScrollRange</span> &nbsp; &nbsp;:= <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">0</span>, ::<span style=\"color: #000000;\">nScrollRange</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nThumbSize</span> &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">1</span> - <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nScrollRange</span> / ::<span style=\"color: #000000;\">nMetroWidth</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">lArranged</span> := .t.<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> LButtonDown<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> nRow < ::<span style=\"color: #000000;\">nScrollBarTop</span> .or. <span style=\"color: #000000;\">&#40;</span> nCol >= ::<span style=\"color: #000000;\">nThumbPos</span> .and. nCol <= <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nThumbPos</span> + ::<span style=\"color: #000000;\">nThumbWidth</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">lDrag</span> &nbsp; &nbsp; = .T.<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nDragRow</span> &nbsp;= nRow<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nOldCol</span> &nbsp; = nCol<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> LButtonUp<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">lDrag</span> &nbsp; &nbsp; = .F.<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nDragRow</span> &nbsp;= <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> MouseMove<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">lDrag</span> .and. ::<span style=\"color: #000000;\">nScrollRange</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nDragRow</span> < ::<span style=\"color: #000000;\">nScrollBarTop</span> .and. nRow < ::<span style=\"color: #000000;\">nScrollBarTop</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">Slide</span><span style=\"color: #000000;\">&#40;</span> nCol - ::<span style=\"color: #000000;\">nOldCol</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; elseif ::<span style=\"color: #000000;\">nDragRow</span> > ::<span style=\"color: #000000;\">nScrollBarTop</span> .and. nRow > ::<span style=\"color: #000000;\">nScrollBarTop</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">Slide</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#40;</span> Int<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nOldCol</span> - nCol <span style=\"color: #000000;\">&#41;</span> * ::<span style=\"color: #000000;\">nScrollRatio</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">lDrag</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">nDragRow</span> &nbsp;:= <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nOldCol</span> = nCol<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> MoveBtn<span style=\"color: #000000;\">&#40;</span> oBtnDrag, oBtnOver <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nDrag, nOver<br /><br />&nbsp; &nbsp;SysRefresh<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oDragWnd != <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; oDragWnd:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oDragWnd &nbsp; &nbsp;:= <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oBtnDrag == oBtnOver<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;nDrag &nbsp; &nbsp;:= AScan<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">aButtons</span>, <span style=\"color: #000000;\">&#123;</span> |o| o == oBtnDrag <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;ADel<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">aButtons</span>, nDrag, .t. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;nOver &nbsp; &nbsp;:= AScan<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">aButtons</span>, <span style=\"color: #000000;\">&#123;</span> |o| o == oBtnOver <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;AIns<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">aButtons</span>, nOver + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> nDrag == nOver, <span style=\"color: #000000;\">1</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span>, oBtnDrag, .t. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oBtnDrag:<span style=\"color: #000000;\">nGroup</span> &nbsp; := oBtnOver:<span style=\"color: #000000;\">nGroup</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">lArranged</span> := .f.<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">Arrange</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;AEval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">aButtons</span>, <span style=\"color: #000000;\">&#123;</span> |o| o:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> ProgramCode<span style=\"color: #000000;\">&#40;</span> lShow <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cPrg &nbsp;:= <span style=\"color: #ff0000;\">''</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oTile<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> lShow := .f.<br /><br />&nbsp; &nbsp;cPrg &nbsp;:= <span style=\"color: #ff0000;\">\"static function MakeMetroPanel( oWnd )\"</span> + CRLF + CRLF<br />&nbsp; &nbsp;cPrg &nbsp;+= <span style=\"color: #ff0000;\">\" &nbsp; local oMetro, oBtn\"</span> + CRLF + CRLF<br />&nbsp; &nbsp;cPrg &nbsp;+= <span style=\"color: #ff0000;\">' &nbsp; DEFINE METROPANEL oMetro OF oWnd TITLE \"'</span> + ::<span style=\"color: #000000;\">cTitle</span> + <span style=\"color: #ff0000;\">'\" ;'</span> + CRLF<br />&nbsp; &nbsp;cPrg &nbsp;+= <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp;COLOR '</span> + cClrToCode<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrText</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">', '</span> + cClrToCode<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrPane</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">' ;'</span> + CRLF<br />&nbsp; &nbsp;cPrg &nbsp;+= <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp;ON CLICK oWnd:End()'</span> + CRLF + CRLF<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">lDesignMode</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= <span style=\"color: #ff0000;\">' &nbsp; oMetro:lDesignMode := .t.'</span> + CRLF + CRLF<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">for</span> each oTile in ::<span style=\"color: #000000;\">aButtons</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp; &nbsp; += oTile:<span style=\"color: #000000;\">ProgramCode</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">next</span><br /><br />&nbsp; &nbsp;cPrg &nbsp;+= CRLF + <span style=\"color: #ff0000;\">\"return oMetro\"</span> + CRLF + CRLF<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lShow<br />&nbsp; &nbsp; &nbsp; ViewCode<span style=\"color: #000000;\">&#40;</span> cPrg <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> cPrg<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> Destroy<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">FONT</span> ::<span style=\"color: #000000;\">oFont</span>, ::<span style=\"color: #000000;\">oFontB</span>, ::<span style=\"color: #000000;\">oBtnFont</span>, ::<span style=\"color: #000000;\">oTextFont</span><br />&nbsp; &nbsp;DeleteObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hPen</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">Destroy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> SwitchTo<span style=\"color: #000000;\">&#40;</span> oNext, lRight <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">oClient</span> := oNext<br />&nbsp; &nbsp;oNext:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">oActive</span> &nbsp; := oNext<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> AddButton<span style=\"color: #000000;\">&#40;</span> lLarge, nGroup, cCaption, bAction, nClrText, nClrPane, cImgName, oFont, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nAlign, nBmpAlign, nBmpWidth, nBmpHeight, cText, nTextAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTextFont, oSubMetro, cBackImage, cAction, cSub <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oBtn<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nX := ::<span style=\"color: #000000;\">nMetroMargin</span> + <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nRow</span> * <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> + <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nY := ::<span style=\"color: #000000;\">nMetroTop</span> + <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nCol</span> * <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBtnSize</span> + <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> lLarge := .F.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> nClrText := CLR_WHITE, nClrPane := NextClr<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oBtn &nbsp;:= TMetroBtn<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> nX, nY, lLarge, <span style=\"color: #00C800;\">Self</span>, cCaption, cImgName, bAction, nAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBmpAlign, nBmpWidth, nBmpHeight, oFont, cText, nTextAlign, oTextFont, oSubMetro, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nGroup, cBackImage, cAction, cSub <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">SetColor</span><span style=\"color: #000000;\">&#40;</span> nClrText, nClrPane <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oBtn:<span style=\"color: #000000;\">nClrCaption</span> &nbsp;:= nClrText<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> cBackImage <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'C'</span> .and. File<span style=\"color: #000000;\">&#40;</span> cBackImage <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style=\"color: #000000;\">SetBackGround</span><span style=\"color: #000000;\">&#40;</span> cBacKImage <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;AAdd<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">aButtons</span>, oBtn <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nCol</span>++<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lLarge<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nCol</span>++<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nCol</span> > <span style=\"color: #000000;\">5</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nRow</span>++<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nCol</span> = <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> oBtn<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> MouseWheel<span style=\"color: #000000;\">&#40;</span> nKey, nDelta, nXPos, nYPos <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nMove &nbsp; &nbsp;:= Int<span style=\"color: #000000;\">&#40;</span> nDelta / <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> n, oBtn<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">oActive</span>:<span style=\"color: #000000;\">Slide</span><span style=\"color: #000000;\">&#40;</span> nDelta / <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> Slide<span style=\"color: #000000;\">&#40;</span> nPixels <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroPanel<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> aRect<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nScrollRange</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> nPixels > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nPixels &nbsp;:= <span style=\"color: #0000ff;\">Min</span><span style=\"color: #000000;\">&#40;</span> nPixels, -::<span style=\"color: #000000;\">nOffSet</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nOffSet</span> + nPixels < -::<span style=\"color: #000000;\">nScrollRange</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nPixels &nbsp;:= -::<span style=\"color: #000000;\">nScrollRange</span>- ::<span style=\"color: #000000;\">nOffSet</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> nPixels != <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect &nbsp; &nbsp; &nbsp; = GetClientRect<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hWnd</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> &nbsp;= IfNil<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nSliderTop</span>, ::<span style=\"color: #000000;\">nMetroTop</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#93;</span> -= <span style=\"color: #000000;\">&#40;</span> SCRLB_HEIGHT + <span style=\"color: #000000;\">2</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ScrollWindow<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hWnd</span>, nPixels, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span>, aRect <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">nOffSet</span> &nbsp; &nbsp;+= nPixels<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nScrollRange</span> > <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">CLASS</span> TMetroBtn <span style=\"color: #0000ff;\">FROM</span> TBtnBmp<br /><br />&nbsp; &nbsp;CLASSDATA lRegistered AS LOGICAL<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> nGroup &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> nMargin &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">8</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> lLarge &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">INIT</span> .f.<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> nCapAlign &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> nOr<span style=\"color: #000000;\">&#40;</span> DT_TOP, DT_RIGHT <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> nBmpAlign &nbsp; &nbsp;<span style=\"color: #0000ff;\">INIT</span> nOr<span style=\"color: #000000;\">&#40;</span> DT_BOTTOM, DT_LEFT <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> nBmpTop, nBmpLeft, nBmpWidth, nBmpHeight<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> cBmpSource<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> cText<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> nTextAlign &nbsp; <span style=\"color: #0000ff;\">INIT</span> nOr<span style=\"color: #000000;\">&#40;</span> DT_RIGHT, DT_VCENTER <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> nClrCaption<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> oTextFont<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> cAction, cSub<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DATA</span> oSub<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> nTop, nLeft, lLarge, oMetro, cCaption, uImage, bAction, nAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBmpAlign, nBmpWidth, nBmpHeight, oFont, oSub, nGroup, cBackImage, cAction, cSub <span style=\"color: #000000;\">&#41;</span> CONSTRUCTOR<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> LoadBitmaps<span style=\"color: #000000;\">&#40;</span> uBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #0000ff;\">Paint</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> DrawPrompt<span style=\"color: #000000;\">&#40;</span> cPrompt, oFont, nColor, nAlign <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> DrawMultiLine<span style=\"color: #000000;\">&#40;</span> cText, oFont, nColor, nAlign <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> DesignMenu<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> AlignObject<span style=\"color: #000000;\">&#40;</span> nRow, nCol <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> CalcBmpAlign<span style=\"color: #000000;\">&#40;</span> lRecalc <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> SetBackGround<span style=\"color: #000000;\">&#40;</span> cImage <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> SetBitmap<span style=\"color: #000000;\">&#40;</span> cImage <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> ToggleSize<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> ProgramCode<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">METHOD</span> Destroy<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">ENDCLASS</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> nTop, nLeft, lLarge, oMetro, cCaption, uImage, bAction, nAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBmpAlign, nBmpWidth, nBmpHeight, oFont, cText, nTextAlign, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTextFont, oSub, nGroup, cBackImage, cAction, cSub <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nWidth &nbsp; := oMetro:<span style=\"color: #000000;\">nBtnSize</span> + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lLarge, oMetro:<span style=\"color: #000000;\">nBtnSize</span> + <span style=\"color: #000000;\">8</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> nAlign := nOr<span style=\"color: #000000;\">&#40;</span> DT_TOP, DT_RIGHT <span style=\"color: #000000;\">&#41;</span>, nBmpAlign := nOr<span style=\"color: #000000;\">&#40;</span> DT_BOTTOM, DT_LEFT <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cText &nbsp;:= <span style=\"color: #ff0000;\">''</span>, nTextAlign := nOr<span style=\"color: #000000;\">&#40;</span> DT_VCENTER, DT_RIGHT <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> nAlign <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'C'</span><br />&nbsp; &nbsp; &nbsp; nAlign &nbsp; &nbsp; &nbsp;:= StrToAlign<span style=\"color: #000000;\">&#40;</span> nAlign, DT_TOP + DT_RIGHT <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> nBmpAlign <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'C'</span><br />&nbsp; &nbsp; &nbsp; nBmpAlign &nbsp; := StrToAlign<span style=\"color: #000000;\">&#40;</span> nBmpAlign, DT_BOTTOM + DT_LEFT <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> nTextAlign <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'C'</span><br />&nbsp; &nbsp; &nbsp; nTextAlign &nbsp;:= StrToAlign<span style=\"color: #000000;\">&#40;</span> nTextAlign, DT_VCENTER + DT_RIGHT <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> nGroup := oMetro:<span style=\"color: #000000;\">nGroups</span><br />&nbsp; &nbsp;oMetro:<span style=\"color: #000000;\">nGroups</span> := <span style=\"color: #0000ff;\">Max</span><span style=\"color: #000000;\">&#40;</span> oMetro:<span style=\"color: #000000;\">nGroups</span>, nGroup <span style=\"color: #000000;\">&#41;</span><br />&nbsp; ::<span style=\"color: #000000;\">nGroup</span> &nbsp; &nbsp; &nbsp; := nGroup<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">lLarge</span> &nbsp; &nbsp; &nbsp; := lLarge<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">lTransparent</span> &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nCapAlign</span> &nbsp; &nbsp;:= nAlign<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nBmpAlign</span> &nbsp; &nbsp;:= nBmpAlign<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nBmpWidth</span> &nbsp; &nbsp;:= nBmpWidth<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nBmpHeight</span> &nbsp; := nBmpHeight<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">cText</span> &nbsp; &nbsp; &nbsp; &nbsp;:= cText<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nTextAlign</span> &nbsp; := nTextAlign<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">oTextFont</span> &nbsp; &nbsp;:= oTextFont<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">oSub</span> &nbsp; &nbsp; &nbsp; &nbsp; := oSub<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">cAction</span> &nbsp; &nbsp; &nbsp;:= cAction<br />&nbsp; &nbsp;::<span style=\"color: #000000;\">cSub</span> &nbsp; &nbsp; &nbsp; &nbsp; := cSub<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cText</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'C'</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">cText</span> &nbsp; &nbsp; := StrTran<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cText</span>, <span style=\"color: #ff0000;\">';'</span>, CRLF <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">Super</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> nTop, nLeft, nWidth, oMetro:<span style=\"color: #000000;\">nBtnSize</span>, uImage, <span style=\"color: #00C800;\">nil</span>, <span style=\"color: #00C800;\">nil</span>, <span style=\"color: #00C800;\">nil</span>, bAction, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMetro, <span style=\"color: #00C800;\">nil</span>, <span style=\"color: #00C800;\">nil</span>, .f., .t., cCaption, oFont, <span style=\"color: #00C800;\">nil</span>, <span style=\"color: #00C800;\">nil</span>, .f., <span style=\"color: #ff0000;\">'BOTTOM'</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .f. <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">bAction</span> := <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oSub</span> == <span style=\"color: #00C800;\">nil</span>,, <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oSub</span>:<span style=\"color: #000000;\">oParent</span> := ::<span style=\"color: #000000;\">oWnd</span>, ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">SwitchTo</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oSub</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">CURSOR</span> ::<span style=\"color: #000000;\">oDragCursor</span> DRAG<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">bDragBegin</span> &nbsp; := <span style=\"color: #000000;\">&#123;</span> |r,c,f,o| BtnDragBegin<span style=\"color: #000000;\">&#40;</span> r,c,f,o <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">bRClicked</span> &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> |r,c,f| ::<span style=\"color: #000000;\">DesignMenu</span><span style=\"color: #000000;\">&#40;</span>r,c,f<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">bMMoved</span> &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> |r,c,f,lDrag| <span style=\"color: #00C800;\">if</span><span style=\"color: #000000;\">&#40;</span> oDragWnd == <span style=\"color: #00C800;\">nil</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nLeft</span> + ::<span style=\"color: #000000;\">nWidth</span> > ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">nWidth</span>, ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">Slide</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">nWidth</span> - ::<span style=\"color: #000000;\">nLeft</span> - ::<span style=\"color: #000000;\">nWidth</span> <span style=\"color: #000000;\">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nLeft</span> < <span style=\"color: #000000;\">0</span> , ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">Slide</span><span style=\"color: #000000;\">&#40;</span> -::<span style=\"color: #000000;\">nLeft</span> + <span style=\"color: #000000;\">8</span> <span style=\"color: #000000;\">&#41;</span> , <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lDrag == .t., oDragWnd:<span style=\"color: #0000ff;\">Move</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nTop</span> + r -oDragWnd:<span style=\"color: #000000;\">Cargo</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nLeft</span> + c - oDragWnd:<span style=\"color: #000000;\">Cargo</span><span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#93;</span>, ::<span style=\"color: #000000;\">nWidth</span>, ::<span style=\"color: #000000;\">nHeight</span>, .t. <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#40;</span>oDragWnd:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>,oDragWnd := <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">OnClick</span> &nbsp; &nbsp; &nbsp;:= <span style=\"color: #000000;\">&#123;</span> || <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bAction</span> == <span style=\"color: #00C800;\">nil</span>,,Eval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">bAction</span>, <span style=\"color: #00C800;\">Self</span> <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> <span style=\"color: #0000ff;\">Paint</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> aInfo, nStyle, aRect, hOldFont, hBmpOld, nOldClr, nZeroZeroClr<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cText<br /><br />&nbsp; &nbsp;aInfo &nbsp; &nbsp; &nbsp; := ::<span style=\"color: #000000;\">DispBegin</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;FillRect<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, GetClientRect<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hWnd</span> <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">hBrush</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hBitmap1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> HasAlpha<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hBitmap1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ABPaint<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, ::<span style=\"color: #000000;\">nBmpLeft</span>, ::<span style=\"color: #000000;\">nBmpTop</span>, ::<span style=\"color: #000000;\">hBitmap1</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; elseif .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DrawTransparent<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, ::<span style=\"color: #000000;\">hBitmap1</span>, ::<span style=\"color: #000000;\">nBmpTop</span>, ::<span style=\"color: #000000;\">nBmpLeft</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; elseif .t.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmpOld &nbsp; &nbsp; &nbsp; &nbsp;:= SelectObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, ::<span style=\"color: #000000;\">hBitmap1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nZeroZeroClr &nbsp; := GetPixel<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SelectObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, hBmpOld <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">// &nbsp; &nbsp; &nbsp; &nbsp; nOldClr = SetBkColor( ::hDC, CLR_WHITE )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TransBmp<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hBitmap1</span>, ::<span style=\"color: #000000;\">nBmpWidth</span>, ::<span style=\"color: #000000;\">nBmpHeight</span>, nZeroZeroClr, ::<span style=\"color: #000000;\">hDC</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">nBmpLeft</span>, ::<span style=\"color: #000000;\">nBmpTop</span>, ::<span style=\"color: #000000;\">nBmpWidth</span>, ::<span style=\"color: #000000;\">nBmpHeight</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #B900B9;\">// &nbsp; &nbsp; &nbsp; &nbsp; SetBkColor( ::hDC, nOldClr )</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cCaption</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">DrawPrompt</span><span style=\"color: #000000;\">&#40;</span> &nbsp;::<span style=\"color: #000000;\">cCaption</span>, IfNil<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oFont</span>, ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">oBtnFont</span> <span style=\"color: #000000;\">&#41;</span>, &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IfNil<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrCaption</span>, ::<span style=\"color: #000000;\">nClrText</span> <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">nCapAlign</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cText</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">DrawPrompt</span><span style=\"color: #000000;\">&#40;</span> &nbsp;::<span style=\"color: #000000;\">cText</span>, IfNil<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oTextFont</span>, ::<span style=\"color: #000000;\">oFont</span>, ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">oTextFont</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">nClrText</span>, ::<span style=\"color: #000000;\">nTextAlign</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">DispEnd</span><span style=\"color: #000000;\">&#40;</span> aInfo <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> DrawPrompt<span style=\"color: #000000;\">&#40;</span> cText, oFont, nColor, nAlign <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> aRect, hOldFont<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'B'</span><br />&nbsp; &nbsp; &nbsp; cText &nbsp; &nbsp; &nbsp; := Eval<span style=\"color: #000000;\">&#40;</span> cText, <span style=\"color: #00C800;\">Self</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;cText &nbsp; &nbsp;:= AllTrim<span style=\"color: #000000;\">&#40;</span> cValToChar<span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> CRLF $ cText<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">return</span> ::<span style=\"color: #000000;\">DrawMultiLine</span><span style=\"color: #000000;\">&#40;</span> cText, oFont, nColor, nAlign <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; SetTextColor<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, nColor <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetBkMode<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; hOldFont &nbsp; &nbsp;:= SelectObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oFont:<span style=\"color: #000000;\">hFont</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; aRect &nbsp; &nbsp; &nbsp; := <span style=\"color: #000000;\">&#123;</span> ::<span style=\"color: #000000;\">nMargin</span>, ::<span style=\"color: #000000;\">nMargin</span>, ::<span style=\"color: #000000;\">nHeight</span> - ::<span style=\"color: #000000;\">nMargin</span>, ::<span style=\"color: #000000;\">nWidth</span> - ::<span style=\"color: #000000;\">nMargin</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp; &nbsp; DrawTextEx<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, cText, aRect, nOr<span style=\"color: #000000;\">&#40;</span> nAlign, DT_SINGLELINE <span style=\"color: #000000;\">&#41;</span> &nbsp;<span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; SelectObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, hOldFont <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> DrawMultiLine<span style=\"color: #000000;\">&#40;</span> cText, oFont, nColor, nAlign <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> aRect, hOldFont, nTextHeight<br /><br />&nbsp; &nbsp;SetTextColor<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, nColor <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;SetBkMode<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;hOldFont &nbsp; &nbsp;:= SelectObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, oFont:<span style=\"color: #000000;\">hFont</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;aRect &nbsp; &nbsp; &nbsp; := <span style=\"color: #000000;\">&#123;</span> ::<span style=\"color: #000000;\">nMargin</span>, ::<span style=\"color: #000000;\">nMargin</span>, ::<span style=\"color: #000000;\">nHeight</span> - ::<span style=\"color: #000000;\">nMargin</span>, ::<span style=\"color: #000000;\">nWidth</span> - ::<span style=\"color: #000000;\">nMargin</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lAnd<span style=\"color: #000000;\">&#40;</span> nAlign, nOr<span style=\"color: #000000;\">&#40;</span> DT_VCENTER, DT_BOTTOM <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; nTextHeight := DrawTextEx<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, cText, aRect, nOr<span style=\"color: #000000;\">&#40;</span> DT_CALCRECT, DT_WORDBREAK <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> lAnd<span style=\"color: #000000;\">&#40;</span> nAlign, DT_BOTTOM <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> &nbsp;:= ::<span style=\"color: #000000;\">nHeight</span> - ::<span style=\"color: #000000;\">nMargin</span> - nTextHeight<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect<span style=\"color: #000000;\">&#91;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#93;</span> &nbsp;:= <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nHeight</span> - nTextHeight <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;DrawTextEx<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, cText, aRect, nAlign <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;SelectObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, hOldFont <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> LoadBitmaps<span style=\"color: #000000;\">&#40;</span> uBmp <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> hBmp &nbsp;:= <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> hBmp1, nBmpWidth, nBmpHeight<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ValType<span style=\"color: #000000;\">&#40;</span> uBmp <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'N'</span> .and. uBmp != <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> IsGdiObject<span style=\"color: #000000;\">&#40;</span> uBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := uBmp<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp := LoadBitmap<span style=\"color: #000000;\">&#40;</span> GetInstance<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, uBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;elseif ValType<span style=\"color: #000000;\">&#40;</span> uBmp <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'C'</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> <span style=\"color: #ff0000;\">'.'</span> $ uBmp<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> File<span style=\"color: #000000;\">&#40;</span> uBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> Lower<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">Right</span><span style=\"color: #000000;\">&#40;</span> uBmp, <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> == <span style=\"color: #ff0000;\">'.bmp'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp := ReadBitmap<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">0</span>, uBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp &nbsp;:= FILoadImg<span style=\"color: #000000;\">&#40;</span> uBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp := LoadBitmap<span style=\"color: #000000;\">&#40;</span> GetInstance<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, uBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> hBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">cBmpSource</span> &nbsp; := uBmp<br />&nbsp; &nbsp; &nbsp; nBmpWidth &nbsp; := nBmpWidth<span style=\"color: #000000;\">&#40;</span> &nbsp;hBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; nBmpHeight &nbsp;:= nBmpHeight<span style=\"color: #000000;\">&#40;</span> hBmp <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">DEFAULT</span> ::<span style=\"color: #000000;\">nBmpWidth</span> := nBmpWidth, ::<span style=\"color: #000000;\">nBmpHeight</span> := nBmpHeight<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> nBmpWidth != ::<span style=\"color: #000000;\">nBmpWidth</span> .or. nBmpHeight != ::<span style=\"color: #000000;\">nBmpHeight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp &nbsp; &nbsp; := ResizeImg<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">&#40;</span> hBmp1 := hBmp <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">nBmpWidth</span>, ::<span style=\"color: #000000;\">nBmpHeight</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DeleteObject<span style=\"color: #000000;\">&#40;</span> hBmp1 <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">CalcBmpAlign</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">hBitmap1</span> &nbsp;:= hBmp<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> CalcBmpAlign<span style=\"color: #000000;\">&#40;</span> lRecalc <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> lRecalc := .f.<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lRecalc<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpTop</span> := ::<span style=\"color: #000000;\">nBmpLeft</span> := <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpWidth</span> <span style=\"color: #000000;\">&#41;</span> .and. ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpHeight</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nBmpTop</span> == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lAnd<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpAlign</span>, DT_BOTTOM <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpTop</span> &nbsp;:= ::<span style=\"color: #000000;\">nHeight</span> - ::<span style=\"color: #000000;\">nMargin</span> - ::<span style=\"color: #000000;\">nBmpHeight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elseif lAnd<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpAlign</span>, DT_VCENTER <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpTop</span> &nbsp;:= <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nHeight</span> - ::<span style=\"color: #000000;\">nBmpHeight</span> <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpTop</span> &nbsp;:= ::<span style=\"color: #000000;\">nMargin</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nBmpLeft</span> == <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lAnd<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpAlign</span>, DT_RIGHT <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpLeft</span> := ::<span style=\"color: #000000;\">nWidth</span> - ::<span style=\"color: #000000;\">nMargin</span> - ::<span style=\"color: #000000;\">nBmpWidth</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elseif lAnd<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpAlign</span>, DT_CENTER <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpLeft</span> := <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nWidth</span> - ::<span style=\"color: #000000;\">nBmpWidth</span> <span style=\"color: #000000;\">&#41;</span> / <span style=\"color: #000000;\">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpLeft</span> := ::<span style=\"color: #000000;\">nMargin</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> DesignMenu<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TmetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oPop, c<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">lDesignMode</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">MENU</span> oPop <span style=\"color: #0000ff;\">POPUP</span> <span style=\"color: #000000;\">2007</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Large Size\"</span> &nbsp; <span style=\"color: #0000ff;\">WHEN</span> <span style=\"color: #000000;\">&#123;</span> |o| o:<span style=\"color: #000000;\">SetCheck</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lLarge</span> <span style=\"color: #000000;\">&#41;</span>, .t. <span style=\"color: #000000;\">&#125;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTION</span> oMenuItem:<span style=\"color: #000000;\">SetCheck</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">ToggleSize</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Colors\"</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Tile\"</span> &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> ::<span style=\"color: #000000;\">SelColor</span><span style=\"color: #000000;\">&#40;</span> .f. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Caption\"</span> &nbsp; <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrCaption</span> := ChooseColor<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrCaption</span> <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"BodyText\"</span> &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrText</span> := ChooseColor<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrText</span> <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ENDMENU</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Set Images\"</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Tile\"</span> &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> ::<span style=\"color: #000000;\">SetBackGround</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Bitmap\"</span> &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> ::<span style=\"color: #000000;\">SetBitmap</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ENDMENU</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Edit Text\"</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Caption\"</span> &nbsp; <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> c &nbsp;:= PadR<span style=\"color: #000000;\">&#40;</span> IfNil<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cCaption</span>, <span style=\"color: #ff0000;\">''</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">15</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> MsgGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Caption\"</span>, <span style=\"color: #ff0000;\">\"Enter 15 Chars for Caption\"</span>, @c <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cCaption</span> := AllTrim<span style=\"color: #000000;\">&#40;</span> c <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"BodyText\"</span> &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> c := PadR<span style=\"color: #000000;\">&#40;</span> IfNil<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cText</span>, <span style=\"color: #ff0000;\">''</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">45</span> <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> MsgGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Body Text\"</span>, <span style=\"color: #ff0000;\">\"Enter 45 Chars for Body\"</span>, @c <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cText</span> := StrTran<span style=\"color: #000000;\">&#40;</span> AllTrim<span style=\"color: #000000;\">&#40;</span> c <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">';'</span>, CRLF <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">nil</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ENDMENU</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Align Elements\"</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Caption\"</span> &nbsp; <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nCapAlign</span> &nbsp;:= ::<span style=\"color: #000000;\">AlignObject</span><span style=\"color: #000000;\">&#40;</span> nRow, nCol <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"BodyText\"</span> &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nTextAlign</span> := ::<span style=\"color: #000000;\">AlignObject</span><span style=\"color: #000000;\">&#40;</span> nRow, nCol <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Bitmap\"</span> &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpAlign</span> &nbsp;:= ::<span style=\"color: #000000;\">AlignObject</span><span style=\"color: #000000;\">&#40;</span> nRow, nCol <span style=\"color: #000000;\">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style=\"color: #000000;\">CalcBmpAlign</span><span style=\"color: #000000;\">&#40;</span> .t. <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">WHEN</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hBitmap1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ENDMENU</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Add New Tile\"</span> <span style=\"color: #0000ff;\">ACTION</span> <span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lLarge</span>, ::<span style=\"color: #000000;\">nGroup</span>, <span style=\"color: #ff0000;\">\"New\"</span> <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">Arrange</span><span style=\"color: #000000;\">&#40;</span> .t. <span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Insert New Tile\"</span> <span style=\"color: #0000ff;\">ACTION</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">MoveBtn</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lLarge</span>, ::<span style=\"color: #000000;\">nGroup</span>, <span style=\"color: #ff0000;\">\"New\"</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #00C800;\">Self</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SEPARATOR</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"GenerateCode\"</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">MENU</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Tile\"</span> &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> ::<span style=\"color: #000000;\">ProgramCode</span><span style=\"color: #000000;\">&#40;</span> .t. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">MENUITEM</span> <span style=\"color: #ff0000;\">\"Metro\"</span> &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTION</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">ProgramCode</span><span style=\"color: #000000;\">&#40;</span> .t. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ENDMENU</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ENDMENU</span><br /><br />&nbsp; &nbsp;oPop:<span style=\"color: #0000ff;\">Activate</span><span style=\"color: #000000;\">&#40;</span> nRow, nCol, <span style=\"color: #00C800;\">Self</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> AlignObject<span style=\"color: #000000;\">&#40;</span> nRow, nCol <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nAlign<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> n &nbsp;:= ::<span style=\"color: #000000;\">nWidth</span> / <span style=\"color: #000000;\">3</span><br /><br />&nbsp; &nbsp;nAlign &nbsp; := <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> nCol > n, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> nCol > <span style=\"color: #000000;\">&#40;</span> n + n <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;n &nbsp; &nbsp; &nbsp; &nbsp;:= ::<span style=\"color: #000000;\">nHeight</span> / <span style=\"color: #000000;\">3</span><br />&nbsp; &nbsp;nAlign &nbsp; += <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> nRow > n, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> nRow > <span style=\"color: #000000;\">&#40;</span> n + n <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">8</span>, <span style=\"color: #000000;\">4</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> nAlign<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> SetBackGround<span style=\"color: #000000;\">&#40;</span> cImage <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> lSet &nbsp;:= .f.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oBrush<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> cImage := cGetFile<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Image File (*.bmp,*.jpg,*.png)|*.bmp;*.jpg;*.png|\"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"Select Background Image\"</span>,,CurDir<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> cImage <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush FILE cImage RESIZE<br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">SetBrush</span><span style=\"color: #000000;\">&#40;</span> oBrush <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">Resize</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #00C800;\">Self</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">BRUSH</span> oBrush<br />&nbsp; &nbsp; &nbsp; lSet &nbsp; &nbsp; := .t.<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> lSet<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> SetBitmap<span style=\"color: #000000;\">&#40;</span> cImage <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> w, h, hBmp<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> cImage := cGetFile<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">\"Image File (*.bmp,*.jpg,*.png,*.ico)|*.bmp;*.jpg;*.png;*.ico|\"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #ff0000;\">\"Select Bitmap File\"</span>,,CurDir<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> cImage <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hBitmap1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DeleteObject<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hBitmap1</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpTop</span> := ::<span style=\"color: #000000;\">nBmpLeft</span> := <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">nBmpWidth</span> := ::<span style=\"color: #000000;\">nBmpHeight</span> := <span style=\"color: #000000;\">50</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #000000;\">LoadBitmaps</span><span style=\"color: #000000;\">&#40;</span> cImage <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #B900B9;\">/*<br />&nbsp; &nbsp; &nbsp; w &nbsp; &nbsp; &nbsp; &nbsp;:= nBmpWidth( ::hBitmap1 )<br />&nbsp; &nbsp; &nbsp; h &nbsp; &nbsp; &nbsp; &nbsp;:= nBmpHeight(::hBitmap1 )<br />&nbsp; &nbsp; &nbsp; if w > ::nWidth / 3 .or. h > ::nHeight / 3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hBmp &nbsp;:= ResizeBitmap( ::hBitmap1, ::nWidth / 3, ::nHeight / 3, 3 )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DeleteObject( ::hBitmap1 )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::hBitmap1 &nbsp;:= hBmp<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::CalcBmpAlign( .t. )<br />&nbsp; &nbsp; &nbsp; endif<br />*/</span><br />&nbsp; &nbsp; &nbsp; ::<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Self</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> ToggleSize<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">lLarge</span> &nbsp; &nbsp; &nbsp; := ! ::<span style=\"color: #000000;\">lLarge</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">nWidth</span> &nbsp; &nbsp; &nbsp; := ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">nBtnSize</span> + <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lLarge</span>, ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">nBtnSize</span> + BTN_GAP, <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">CalcBmpAlign</span><span style=\"color: #000000;\">&#40;</span> .t. <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">Arrange</span><span style=\"color: #000000;\">&#40;</span> .t. <span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;AEval<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oWnd</span>:<span style=\"color: #000000;\">aButtons</span>, <span style=\"color: #000000;\">&#123;</span> |o| o:<span style=\"color: #0000ff;\">Refresh</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> ::<span style=\"color: #000000;\">lLarge</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> ProgramCode<span style=\"color: #000000;\">&#40;</span> lShow <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cPrg &nbsp;:= <span style=\"color: #ff0000;\">''</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> lShow := .f.<br /><br /><span style=\"color: #00D7D7;\">#define</span> NL &nbsp;<span style=\"color: #ff0000;\">' ;'</span> + CRLF<br /><br />&nbsp; &nbsp;cPrg &nbsp; &nbsp; := <span style=\"color: #ff0000;\">' &nbsp; DEFINE METROBUTTON oBtn OF oMetro'</span><br />&nbsp; &nbsp;cPrg &nbsp; &nbsp; += NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; &nbsp;COLOR &nbsp; '</span> + cClrToCode<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrText</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">','</span> + cClrToCode<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrPane</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cCaption</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp;CAPTION &nbsp; \"'</span> + ::<span style=\"color: #000000;\">cCaption</span> + <span style=\"color: #ff0000;\">'\"'</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; &nbsp;ALIGN &nbsp; \"'</span> + AlignStr<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nCapAlign</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">'\"'</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nGroup</span> > <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; &nbsp;GROUP &nbsp; '</span> + LTrim<span style=\"color: #000000;\">&#40;</span> Str<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nGroup</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hBitmap1</span> <span style=\"color: #000000;\">&#41;</span> .and. ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cBmpSource</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; BITMAP &nbsp; \"'</span> + ::<span style=\"color: #000000;\">cBmpSource</span> + <span style=\"color: #ff0000;\">'\"'</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; BMPALIGN &nbsp; \"'</span> + AlignStr<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpAlign</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">'\"'</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; &nbsp; SIZE &nbsp; '</span> + LTrim<span style=\"color: #000000;\">&#40;</span> Str<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpWidth</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">', '</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LTrim<span style=\"color: #000000;\">&#40;</span> Str<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nBmpHeight</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cText</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; BODYTEXT &nbsp; \"'</span> + StrTran<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cText</span>, CRLF, <span style=\"color: #ff0000;\">';'</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">'\"'</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp;TEXTALIGN &nbsp; \"'</span> + AlignStr<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nTextAlign</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #ff0000;\">'\"'</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">hBitmap</span> <span style=\"color: #000000;\">&#41;</span> .and. ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">cBmpFile</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; BACKGROUND &nbsp; \"'</span> + ::<span style=\"color: #000000;\">oBrush</span>:<span style=\"color: #000000;\">cBmpFile</span> + <span style=\"color: #ff0000;\">'\"'</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">lLarge</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= NL + <span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; &nbsp;LARGE &nbsp; '</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cSub</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; cPrg += NL + &nbsp;<span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; &nbsp; MENU &nbsp; '</span> + ::<span style=\"color: #000000;\">cSub</span><br />&nbsp; &nbsp;elseif ! Empty<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">cAction</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; cPrg += NL + &nbsp;<span style=\"color: #ff0000;\">' &nbsp; &nbsp; &nbsp; ACTION &nbsp; '</span> + ::<span style=\"color: #000000;\">cAction</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;cPrg += CRLF<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">nClrCaption</span> != ::<span style=\"color: #000000;\">nClrText</span><br />&nbsp; &nbsp; &nbsp; cPrg &nbsp;+= <span style=\"color: #ff0000;\">' &nbsp; oBtn:nClrCaption := '</span> + cClrToCode<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">nClrCaption</span> <span style=\"color: #000000;\">&#41;</span> + CRLF<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;cPrg &nbsp; &nbsp; += CRLF<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> lShow<br />&nbsp; &nbsp; &nbsp; ViewCode<span style=\"color: #000000;\">&#40;</span> cPrg <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />#undef NL<br /><br /><span style=\"color: #00C800;\">return</span> cPrg<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">METHOD</span> Destroy<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #00C800;\">CLASS</span> TMetroBtn<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> ::<span style=\"color: #000000;\">oDragCursor</span> != <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">RELEASE</span> CUSROR ::<span style=\"color: #000000;\">oDragCursor</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">Super</span>:<span style=\"color: #000000;\">Destroy</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><span style=\"color: #B900B9;\">// SUPPORT FUNCTIONS</span><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> StrToAlign<span style=\"color: #000000;\">&#40;</span> cAlign, nDefault <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> x, y<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">DEFAULT</span> nDefault := <span style=\"color: #000000;\">0</span><br />&nbsp; &nbsp;cAlign &nbsp; &nbsp; &nbsp;:= Upper<span style=\"color: #000000;\">&#40;</span> cAlign <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;x &nbsp;:= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'LEF'</span> $ cAlign, <span style=\"color: #000000;\">0</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'CEN'</span> $ cAlign, <span style=\"color: #000000;\">1</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'RIG'</span> $ cAlign, <span style=\"color: #000000;\">2</span>, nAnd<span style=\"color: #000000;\">&#40;</span> nDefault, &nbsp;<span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;y &nbsp;:= <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'TOP'</span> $ cAlign, <span style=\"color: #000000;\">0</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'MID'</span> $ cAlign, <span style=\"color: #000000;\">4</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'BOT'</span> $ cAlign, <span style=\"color: #000000;\">8</span>, nAnd<span style=\"color: #000000;\">&#40;</span> nDefault, <span style=\"color: #000000;\">12</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> nOr<span style=\"color: #000000;\">&#40;</span> x, y <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> AlignStr<span style=\"color: #000000;\">&#40;</span> nAlign <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cAlign &nbsp; := <span style=\"color: #ff0000;\">''</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> n &nbsp; &nbsp; &nbsp; &nbsp;:= nAnd<span style=\"color: #000000;\">&#40;</span> nAlign, <span style=\"color: #000000;\">12</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;cAlign &nbsp; := <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> n == <span style=\"color: #000000;\">8</span>, <span style=\"color: #ff0000;\">'BOTTOM'</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> n == <span style=\"color: #000000;\">4</span>, <span style=\"color: #ff0000;\">'MIDDLE'</span>, <span style=\"color: #ff0000;\">'TOP'</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;n &nbsp; &nbsp; &nbsp; &nbsp;:= nAnd<span style=\"color: #000000;\">&#40;</span> nAlign, <span style=\"color: #000000;\">3</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;cAlign &nbsp; += <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> n == <span style=\"color: #000000;\">2</span>, <span style=\"color: #ff0000;\">'RIGHT'</span>, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> n == <span style=\"color: #000000;\">1</span>, <span style=\"color: #ff0000;\">'CENTER'</span>, <span style=\"color: #ff0000;\">'LEFT'</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> cAlign<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> NextClr<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">static</span> n &nbsp; &nbsp;:= <span style=\"color: #000000;\">1</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> cClr &nbsp;:= <span style=\"color: #ff0000;\">\"E0AE022770EA3C1FB54E98188546020EB15601B1D5ADA6491B30BB008DD49E313A00AB899B83715A0061863B0DADA84B\"</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> nClr &nbsp;:= HexToNum<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #0000ff;\">SubStr</span><span style=\"color: #000000;\">&#40;</span> cClr, n, <span style=\"color: #000000;\">6</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;n &nbsp;+= <span style=\"color: #000000;\">6</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> n > Len<span style=\"color: #000000;\">&#40;</span> cClr <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; n &nbsp;:= <span style=\"color: #000000;\">1</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> nClr<br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> BtnDragBegin<span style=\"color: #000000;\">&#40;</span> nRow, nCol, nFlags, oBtn <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oBmp, hBmp<br /><br />&nbsp; &nbsp;SetDropInfo<span style=\"color: #000000;\">&#40;</span> oBtn <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oDragWnd != <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; oDragWnd:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oDragWnd &nbsp; &nbsp;:= <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;hBmp &nbsp; &nbsp; := WndBitmap<span style=\"color: #000000;\">&#40;</span> oBtn:<span style=\"color: #000000;\">hWnd</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">WINDOW</span> oDragWnd <span style=\"color: #0000ff;\">COLOR</span> oBtn:<span style=\"color: #000000;\">nClrText</span>, oBtn:<span style=\"color: #000000;\">nClrPane</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">STYLE</span> nOr<span style=\"color: #000000;\">&#40;</span> WS_POPUP, WS_VISIBLE <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;oDragWnd:<span style=\"color: #000000;\">nOpacity</span> := <span style=\"color: #000000;\">180</span><br />&nbsp; &nbsp;@ <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">0</span> BITMAP oBmp <span style=\"color: #0000ff;\">OF</span> oDragWnd <span style=\"color: #0000ff;\">SIZE</span> oBtn:<span style=\"color: #000000;\">nWidth</span>, oBtn:<span style=\"color: #000000;\">nHeight</span> <span style=\"color: #0000ff;\">PIXEL</span><br />&nbsp; &nbsp;oBmp:<span style=\"color: #000000;\">hBitmap</span> &nbsp; := hBmp<br />&nbsp; &nbsp;oBmp:<span style=\"color: #000000;\">bDropOver</span> &nbsp;:= <span style=\"color: #000000;\">&#123;</span> |u,r,c,f| BtnDragEnd<span style=\"color: #000000;\">&#40;</span> u,r,c,f <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;oDragWnd:<span style=\"color: #000000;\">Cargo</span> := <span style=\"color: #000000;\">&#123;</span> nRow, nCol <span style=\"color: #000000;\">&#125;</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">WINDOW</span> oDragWnd &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> <span style=\"color: #000000;\">&#40;</span> oDragWnd:<span style=\"color: #0000ff;\">Move</span><span style=\"color: #000000;\">&#40;</span> oBtn:<span style=\"color: #000000;\">nTop</span>,oBtn:<span style=\"color: #000000;\">nLeft</span>,oBtn:<span style=\"color: #000000;\">nWidth</span>,oBtn:<span style=\"color: #000000;\">nHeight</span>,.t. <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> BtnDragEnd<span style=\"color: #000000;\">&#40;</span> oDragged, nRow, nCol, nFlags <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oMetro &nbsp; := oDragged:<span style=\"color: #000000;\">oWnd</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> hDropBtn, oDroppedOn<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> r, c, o<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oDragWnd != <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp; &nbsp; oDragWnd:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oDragWnd := <span style=\"color: #00C800;\">nil</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;r &nbsp;:= oDragged:<span style=\"color: #000000;\">nTop</span> &nbsp;+ nRow<br />&nbsp; &nbsp;c &nbsp;:= oDragged:<span style=\"color: #000000;\">nLeft</span> + nCol<br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> r > 0x8000<br />&nbsp; &nbsp; &nbsp; r &nbsp;-= 0xffff<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> c > 0x8000<br />&nbsp; &nbsp; &nbsp; c &nbsp;-= 0xffff<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">for</span> each o in oMetro:<span style=\"color: #000000;\">aButtons</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">if</span> r >= o:<span style=\"color: #000000;\">nTop</span> .and. r <= o:<span style=\"color: #000000;\">nTop</span> + o:<span style=\"color: #000000;\">nHeight</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> c >= o:<span style=\"color: #000000;\">nLeft</span> .and. c <= o:<span style=\"color: #000000;\">nLeft</span> + o:<span style=\"color: #000000;\">nWidth</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDroppedOn := o<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp; &nbsp; <span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">next</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oDroppedOn != <span style=\"color: #00C800;\">nil</span> .and. oDroppedOn:<span style=\"color: #000000;\">IsKindOf</span><span style=\"color: #000000;\">&#40;</span> <span style=\"color: #ff0000;\">'TMETROBTN'</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oMetro:<span style=\"color: #000000;\">MoveBtn</span><span style=\"color: #000000;\">&#40;</span> oDragged, oDroppedOn <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> ViewCode<span style=\"color: #000000;\">&#40;</span> cCode <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oGet<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oDlg<br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oFont<br /><br /><span style=\"color: #00D7D7;\">#define</span> DLGWD &nbsp;<span style=\"color: #000000;\">350</span> <span style=\"color: #B900B9;\">//250</span><br /><span style=\"color: #00D7D7;\">#define</span> DLGHT &nbsp;<span style=\"color: #000000;\">250</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">'LUCIDA CONSOLE'</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">-12</span><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">SIZE</span> DLGWD*<span style=\"color: #000000;\">2</span>, DLGHT*<span style=\"color: #000000;\">2</span> <span style=\"color: #0000ff;\">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Program Code Generated\"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <span style=\"color: #000000;\">10</span>,<span style=\"color: #000000;\">10</span> <span style=\"color: #0000ff;\">GET</span> oGet <span style=\"color: #0000ff;\">VAR</span> cCode <span style=\"color: #0000ff;\">TEXT</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SIZE</span> DLGWD<span style=\"color: #000000;\">-10</span>,DLGHT<span style=\"color: #000000;\">-45</span> <span style=\"color: #0000ff;\">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">OF</span> oDlg <span style=\"color: #0000ff;\">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ DLGHT<span style=\"color: #000000;\">-20</span>,<span style=\"color: #000000;\">05</span> BUTTONBMP BITMAP <span style=\"color: #ff0000;\">'..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\c</span>opy3.bmp'</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">16</span>,<span style=\"color: #000000;\">16</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTION</span> CopyToClip<span style=\"color: #000000;\">&#40;</span> cCode <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;@ DLGHT<span style=\"color: #000000;\">-20</span>,DLGWD<span style=\"color: #000000;\">-21</span> BUTTONBMP BITMAP <span style=\"color: #ff0000;\">'..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\c</span>lose.bmp'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">16</span>,<span style=\"color: #000000;\">16</span> <span style=\"color: #0000ff;\">PIXEL</span> <span style=\"color: #0000ff;\">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ACTION</span> oDlg:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">CENTERED</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">RELEASE</span> <span style=\"color: #0000ff;\">FONT</span> oFont<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #B900B9;\">//----------------------------------------------------------------------------//</span><br /><span style=\"color: #00C800;\">static</span> <span style=\"color: #00C800;\">function</span> CopyToClip<span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oClip<br /><br />&nbsp; &nbsp;oClip := TClipBoard<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">if</span> oClip:<span style=\"color: #000000;\">Open</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oClip:<span style=\"color: #000000;\">SetText</span><span style=\"color: #000000;\">&#40;</span> cText <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oClip:<span style=\"color: #000000;\">Close</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">endif</span><br />&nbsp; &nbsp;oClip:<span style=\"color: #000000;\">End</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span></div>[/code:1ora3fu4]", "time": "10:45", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "I can't understand why oBtn is nil after the first command:\n\n[code=fw:1lbf9d64]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"> &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON oBtn <span style=\"color: #0000ff;\">OF</span> oMetro1 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">PROMPT</span> FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #0000ff;\">COLOR</span> CLR_WHITE, RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">174</span>, <span style=\"color: #000000;\">224</span> <span style=\"color: #000000;\">&#41;</span> ; &nbsp;<span style=\"color: #B900B9;\">// 1 primer campo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">IMAGE</span> <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTION</span> ShowRecords<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">Cargo</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style=\"color: #000000;\">Cargo</span> := RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span></div>[/code:1lbf9d64]\n\nSomeone else see where the fail comes from ? We may be missing something...", "time": "14:43", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Antonio Linares,\n\nacho que os usuarios nao entram no forum portugues só entram no spanish ou english.\n\ncom esse teste dá error:\n\n Error description: Error BASE/1003 Variable does not exist: SELF", "time": "14:48", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Debes estar usando nuevamente un metro.ch equivocado\n\nGenera el fichero PPO y copialo aqui, gracias", "time": "14:54", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Antonio, neste teste uso o metropnl.ch do \\fwh\\include e não o metro.ch compilado\n\n[code=fw:sgwll41a]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\">oMetro1 := TMetroPanel<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>:<span style=\"color: #00C800;\">New</span><span style=\"color: #000000;\">&#40;</span> oWnd, <span style=\"color: #ff0000;\">\"Catálogo de Vinhos\"</span>,,, <span style=\"color: #000000;\">&#123;</span>|| msgalert<span style=\"color: #000000;\">&#40;</span>ownd:<span style=\"color: #000000;\">oCtlFocus</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span>,,, <span style=\"color: #000000;\">&#41;</span><br /><br />oMetro1:<span style=\"color: #000000;\">lDesignMode</span> := .T.<br />lMetro<span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#93;</span> := .T.<br />DBSELECTAREA<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">1</span><span style=\"color: #000000;\">&#41;</span><br />DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">while</span> !eof<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><br /><br />&nbsp; &nbsp; &nbsp; oBtn := oMetro1:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> .F.,, FieldGet<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">1</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#123;</span>|| ShowRecords<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">Cargo</span> <span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#125;</span>, <span style=\"color: #000000;\">16777215</span>, <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">174</span> * <span style=\"color: #000000;\">256</span> <span style=\"color: #000000;\">&#41;</span> + <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">224</span> * <span style=\"color: #000000;\">65536</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\b</span>itmaps<span style=\"color: #000000;\">\\m</span>etro<span style=\"color: #000000;\">\\f</span>iles.bmp\"</span>,,,,,,,,,,, <span style=\"color: #ff0000;\">\"ShowRecords( ::Cargo )\"</span>, <span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBtn:<span style=\"color: #000000;\">Cargo</span> := RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />&nbsp; &nbsp; &nbsp; DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />end<br /><br />&nbsp;</div>[/code:sgwll41a]", "time": "15:06", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Aqui falta Self:\n\n{| Self | ShowRecords( ::Cargo )}\n\nFalta la modificación al CH que te indiqué", "time": "15:15", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Antonio ,\n\nA alteração que indicou foi no metro.ch mas nao funciona , teste alterar o metropnl.ch e funciona bem :\n[code=fw:fu8jj5zo]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><span style=\"color: #000000;\">&#91;</span> <oBtn> := <span style=\"color: #000000;\">&#93;</span> <oMetro>:<span style=\"color: #000000;\">AddButton</span><span style=\"color: #000000;\">&#40;</span> <.large.>, <nGroup>, <cPrompt>, <span style=\"color: #000000;\">&#91;</span><span style=\"color: #000000;\">&#123;</span>| <span style=\"color: #00C800;\">Self</span> |<uAction><span style=\"color: #000000;\">&#125;</span><span style=\"color: #000000;\">&#93;</span>, <nClrText>, <nClrPane>, &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<cImgName>, <oFont>, <nAlign>, <nBmpAlign>, <nBmpWidth>, <nBmpHeight>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<cText>, <nTextAlign>, <oTextFont>, <oSub>, <cImage>, <<span style=\"color: #ff0000;\">\"uAction\"</span>>, <<span style=\"color: #ff0000;\">\"oSub\"</span>> <span style=\"color: #000000;\">&#41;</span></div>[/code:fu8jj5zo]\n\nfunciona bem com metropnl.ch e nao com metro.ch.\n\n\nGracias Maestro", "time": "15:22", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Ya no te da el error de Cargo ?", "time": "15:30", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "no da error nenhum , quando click button return o recno()\n\nGracias", "time": "15:54", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "No entiendo bien lo que dices\n\nSigue dando error ?", "time": "16:02", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-05-22", "forum": "All products support", "text": "Antonio,\n\nNo, everything is fine, has no error , return the recno () right.\n\nwhen I click the right mouse button opens a menu, how to remove this menu?\n\nThank´s", "time": "16:06", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-06-03", "forum": "All products support", "text": "Bom dia,\n\nTem como fazer uma pesquisa , exemplo pesquisar o metrobutton que tem nClrCaption :=\"Nome Teste\" e dar o focus nesse metrobutton , o metropanel deslizar para esse metrobutton?\n\nCumprimentos\n\nJoão Alpande", "time": "12:14", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-06-03", "forum": "All products support", "text": "Joao,\n\n[quote=\"Joaoalpande\":zs7id9jh]Antonio,\n\nNo, everything is fine, has no error , return the recno () right.\n\nwhen I click the right mouse button opens a menu, how to remove this menu?\n\nThank´s[/quote:zs7id9jh]\n\nCould you post a screenshot ? thanks", "time": "17:14", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-06-03", "forum": "All products support", "text": "Joao,\n\n[quote=\"Joaoalpande\":28tmbozq]Bom dia,\n\nTem como fazer uma pesquisa , exemplo pesquisar o metrobutton que tem nClrCaption :=\"Nome Teste\" e dar o focus nesse metrobutton , o metropanel deslizar para esse metrobutton?\n\nCumprimentos\n\nJoão Alpande[/quote:28tmbozq]\n\nPlease post a screenshot or an example to test here. I don't understand what you mean, thanks", "time": "17:15", "topic": "Classe Metro", "username": "Antonio Linares" } ]
Classe Metro
[ { "date": "2015-06-04", "forum": "All products support", "text": "[quote=\"Antonio Linares\":1b54qvi0]Joao,\n\n[quote=\"Joaoalpande\":1b54qvi0]Antonio,\n\nNo, everything is fine, has no error , return the recno () right.\n\nwhen I click the right mouse button opens a menu, how to remove this menu?\n\nThank´s[/quote:1b54qvi0]\n\nCould you post a screenshot ? thanks[/quote:1b54qvi0]\n\n\nthis problem was solved , I changed the metropnl.prg line: // ::bRClicked := { |r,c,f| ::DesignMenu(r,c,f) }\n\nThank´s\nJoão ALpande", "time": "10:03", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-06-04", "forum": "All products support", "text": "[quote=\"Antonio Linares\":23umzrhz]Joao,\n\n[quote=\"Joaoalpande\":23umzrhz]Bom dia,\n\nTem como fazer uma pesquisa , exemplo pesquisar o metrobutton que tem nClrCaption :=\"Nome Teste\" e dar o focus nesse metrobutton , o metropanel deslizar para esse metrobutton?\n\nCumprimentos\n\nJoão Alpande[/quote:23umzrhz]\n\nPlease post a screenshot or an example to test here. I don't understand what you mean, thanks[/quote:23umzrhz]\n\nI need to create a button where the user types the name of the wine , then metropanel should slide until this button is positioned in the registry that researched , excuse my English I am using translator.\n\n[code=fw:23umzrhz]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">FUNCTION</span> ShowRecords<span style=\"color: #000000;\">&#40;</span> NREC,oWnd,OMETRO  <span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">local</span> oMetro2, oBtn, oFont, oHScroll,oBtn1,oBtn2,oBt:=<span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">&#125;</span><br />    oMetro:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">IF</span> FILE<span style=\"color: #000000;\">&#40;</span> c_Path + <span style=\"color: #ff0000;\">\"F_ART.DBF\"</span> <span style=\"color: #000000;\">&#41;</span><br />    DBSELECTAREA<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#41;</span><br />    NET_USE <span style=\"color: #000000;\">&#40;</span>c_Path + <span style=\"color: #ff0000;\">\"F_ART.DBF\"</span>, <span style=\"color: #000000;\">3</span>,.T.<span style=\"color: #000000;\">&#41;</span><br />        <span style=\"color: #0000ff;\">INDEX</span> <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #000000;\">2</span>->C_des     <span style=\"color: #0000ff;\">TO</span> f_art<br />   <span style=\"color: #00C800;\">ELSE</span><br />        MSGALERT<span style=\"color: #000000;\">&#40;</span><span style=\"color: #ff0000;\">\"ARQUIVO ARTIGOS INEXISTENTE\"</span>,<span style=\"color: #ff0000;\">\"Atenção\"</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">ENDIF</span><br />   <span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">FONT</span> oFont <span style=\"color: #0000ff;\">NAME</span> <span style=\"color: #ff0000;\">\"Segoe UI Light\"</span> <span style=\"color: #0000ff;\">SIZE</span> <span style=\"color: #000000;\">0</span>, <span style=\"color: #000000;\">-30</span> BOLD<br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> METROPANEL oMetro2 <span style=\"color: #0000ff;\">OF</span> oWnd <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"VINHOS\"</span> ;<br />     <span style=\"color: #0000ff;\">COLOR</span> RGB<span style=\"color: #000000;\">&#40;</span>  <span style=\"color: #000000;\">0</span>,  <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">64</span> <span style=\"color: #000000;\">&#41;</span>, RGB<span style=\"color: #000000;\">&#40;</span>  <span style=\"color: #000000;\">0</span>,  <span style=\"color: #000000;\">0</span>,<span style=\"color: #000000;\">64</span><span style=\"color: #000000;\">&#41;</span><br />   D_BACKGRD<span style=\"color: #000000;\">&#40;</span> oMetro2, <span style=\"color: #000000;\">4</span>, , , , , , c_path1 + <span style=\"color: #ff0000;\">\"vinho3.Jpg\"</span> <span style=\"color: #000000;\">&#41;</span><br />   oMetro2:<span style=\"color: #000000;\">lDesignMode</span> := .T.<br />   oMetro2:<span style=\"color: #000000;\">nMetroTop</span> = <span style=\"color: #000000;\">120</span><br />   oMetro2:<span style=\"color: #000000;\">nMetroMargin</span> = <span style=\"color: #000000;\">20</span><br />   oMetro2:<span style=\"color: #000000;\">nBtnSize</span> = <span style=\"color: #000000;\">150</span><br />   oMetro2:<span style=\"color: #000000;\">nSliderTop</span> = <span style=\"color: #000000;\">120</span><br />   oWnd:<span style=\"color: #000000;\">bMouseWheel</span> = <span style=\"color: #000000;\">&#123;</span> | nKey, nDelta, nXPos, nYPos | oMetro2:<span style=\"color: #000000;\">MouseWheel</span><span style=\"color: #000000;\">&#40;</span> nKey, nDelta, nXPos, nYPos <span style=\"color: #000000;\">&#41;</span>  <span style=\"color: #000000;\">&#125;</span><br /><br />   <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON oBtn <span style=\"color: #0000ff;\">OF</span> oMetro2 ;<br />   <span style=\"color: #0000ff;\">COLOR</span>   CLR_WHITE,RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>,  <span style=\"color: #000000;\">0</span>,  <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span> ;<br />          GROUP   <span style=\"color: #000000;\">2</span> ;<br />           BITMAP   C_Path1+ <span style=\"color: #ff0000;\">\"back-black-48.png\"</span> ;<br />     BMPALIGN   <span style=\"color: #ff0000;\">\"MIDDLECENTER\"</span> ;<br />     LARGE;<br />       <span style=\"color: #0000ff;\">ACTION</span>   <span style=\"color: #000000;\">&#40;</span>NET_CLOSE <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">3</span>,<span style=\"color: #000000;\">5</span>,.T.<span style=\"color: #000000;\">&#41;</span>,oMetro2:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oMetro:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br />  DBSELECTAREA<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#41;</span><br />  SET FILTER <span style=\"color: #0000ff;\">TO</span> val<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#41;</span>->C_CODREG<span style=\"color: #000000;\">&#41;</span>=nRec<br />  DBGOTOP<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#41;</span><br />  <span style=\"color: #00C800;\">WHILE</span> !EOF<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">IF</span> !EMPTY<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">2</span>->C_DES<span style=\"color: #000000;\">&#41;</span><br />      <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON oBtn <span style=\"color: #0000ff;\">OF</span> oMetro2 ;<br />      <span style=\"color: #0000ff;\">PROMPT</span>  oemtoansi<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">2</span>->C_DES<span style=\"color: #000000;\">&#41;</span>;<br />      <span style=\"color: #0000ff;\">COLOR</span>   CLR_WHITE,CLR_RED ;<br />      ALIGN   <span style=\"color: #ff0000;\">\"MIDDLECENTER\"</span>  ;<br />      <span style=\"color: #0000ff;\">FONT</span>  oFontSmall2 ;<br />      BODYTEXT   <span style=\"color: #ff0000;\">\"Preço \"</span>+str<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">2</span>->c_pvp,<span style=\"color: #000000;\">6</span>,<span style=\"color: #000000;\">2</span><span style=\"color: #000000;\">&#41;</span>  ;<br />      TEXTALIGN   <span style=\"color: #ff0000;\">\"BOTTOMCENTER\"</span> ;<br />      large;<br />       <span style=\"color: #0000ff;\">ACTION</span> Detalhe<span style=\"color: #000000;\">&#40;</span>::<span style=\"color: #000000;\">Cargo</span>,oWnd  <span style=\"color: #000000;\">&#41;</span><br />      oBtn:<span style=\"color: #000000;\">Cargo</span> := RecNo<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br />   <span style=\"color: #00C800;\">ENDIF</span><br />   DbSkip<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /> END<br /> <span style=\"color: #0000ff;\">DEFINE</span> METROBUTTON oBtn <span style=\"color: #0000ff;\">OF</span> oMetro2 ;<br />   <span style=\"color: #0000ff;\">COLOR</span>   CLR_WHITE,RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>,  <span style=\"color: #000000;\">0</span>,  <span style=\"color: #000000;\">0</span> <span style=\"color: #000000;\">&#41;</span> ;<br />          GROUP   <span style=\"color: #000000;\">2</span> ;<br />           BITMAP   C_Path1+ <span style=\"color: #ff0000;\">\"back-black-48.png\"</span> ;<br />     BMPALIGN   <span style=\"color: #ff0000;\">\"MIDDLECENTER\"</span> ;<br />     LARGE;<br />       <span style=\"color: #0000ff;\">ACTION</span>   <span style=\"color: #000000;\">&#40;</span>NET_CLOSE <span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">3</span>,<span style=\"color: #000000;\">5</span>,.T.<span style=\"color: #000000;\">&#41;</span>,oMetro2:<span style=\"color: #000000;\">Hide</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, oMetro:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><span style=\"color: #000000;\">&#41;</span><br /> oMetro2:<span style=\"color: #000000;\">Show</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">RETURN</span> <span style=\"color: #00C800;\">NIL</span><br /> </div>[/code:23umzrhz]\n[img:23umzrhz]http&#58;//i&#46;imgur&#46;com/3jfWqrp&#46;jpg[/img:23umzrhz]", "time": "10:15", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-09-12", "forum": "All products support", "text": "Joao,\nDo you have a demo of your program or can you post some more screenshots?\nYour program is looking very good.\nBest regards,\nOtto", "time": "22:08", "topic": "Classe Metro", "username": "Otto" } ]
Classe Metro
[ { "date": "2015-09-16", "forum": "All products support", "text": "[quote=\"Otto\":3odbp6t3]Joao,\nDo you have a demo of your program or can you post some more screenshots?\nYour program is looking very good.\nBest regards,\nOtto[/quote:3odbp6t3]\n\nGood Morning,\n\nis a small software with few screens, the f_reg.dbf f_regt.dbf f_art.dbf comes with the other software records .\nto enter do not need user or password\n[url:3odbp6t3]http&#58;//www&#46;4shared&#46;com/file/jv17uSoUce/VLWVINHO&#46;html[/url:3odbp6t3]", "time": "11:47", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2015-09-16", "forum": "All products support", "text": "Hello,\nthank you. But I can't download from this space.\nCan you upload to another place, please.\nThanks in adance\nOtto", "time": "20:36", "topic": "Classe Metro", "username": "Otto" } ]
Classe Metro
[ { "date": "2015-09-17", "forum": "All products support", "text": "Goog Morning,\n\ndropbox :\n [url:upu4ckq0]https&#58;//www&#46;dropbox&#46;com/s/murnkxh9aup13vg/VLWVINHO&#46;exe?dl=0[/url:upu4ckq0] \n\nyour email address?", "time": "10:36", "topic": "Classe Metro", "username": "Joaoalpande" } ]
Classe Metro
[ { "date": "2007-09-02", "forum": "All products support", "text": "Ho un problema con la classe RichEdit.\nQuesto è il codice:\n\n[code:223mkoh2]\n\n#include \"Fivewin&#46;ch\"\n#include \"Richedit&#46;ch\"\n\nFUNCTION MAIN&#40;&#41;\n\n LOCAL hDll &#58;= LOADLIBRARY&#40; \"RICHED20&#46;DLL\" &#41;\n\n LOCAL oDlg\n\n LOCAL oRich, cVar &#58;= \"\"\n\n DEFINE DIALOG oDlg FROM 0, 0 TO 15, 40 TITLE \"Test Richedit\"\n\n @ 0, 0 RICHEDIT oRich VAR cVar SIZE 160,80 OF oDlg\n\n @ 5, 11 BUTTON \"&Second\" ACTION DIALOG_2&#40;&#41;\n\n ACTIVATE DIALOG oDlg CENTER\n\n FREELIBRARY&#40; hDll &#41;\n\nRETURN NIL\n\nSTATIC FUNCTION DIALOG_2&#40;&#41;\n\n LOCAL oDlg\n\n LOCAL oRich, cVar &#58;= \"\"\n\n DEFINE DIALOG oDlg FROM 30, 100 TO 45, 140 TITLE \"Second\"\n\n @ 0, 0 RICHEDIT oRich VAR cVar SIZE 160,80 OF oDlg\n\n @ 5, 11 BUTTON \"&First\" ACTION oDlg&#58;End&#40;&#41;\n\n ACTIVATE DIALOG oDlg\n\nRETURN NIL\n\n[/code:223mkoh2]\n\nSe chiudo il programma senza richiamare la seconda dialog è tutto ok.\nSe richiamo la seconda dialog, torno sulla prima e chiudo il programma ottengo questo errore:\n\n[b:223mkoh2]Harbour Exception\n\nCalled from RESETOLEUNINIT(0)[/b:223mkoh2]\n\nHo l'impressione che, quando chiudo la seconda dialog, la funzione RESetOleUnInit( ::hWnd ) del metodo SetOleInit() effettui il reset anche dell'oggetto della prima dialog. \n\nPotete aiutarmi?\nGrazie.\n\nPier Luigi", "time": "23:08", "topic": "Classe Richedit", "username": "Pier Luigi" } ]
Classe Richedit
[ { "date": "2007-09-03", "forum": "All products support", "text": "Il tuo esempio a me non dà problemi. Uso le ultime versioni sia di FWH che di xHarbour (dal CVS) e BCC55.\n\nEMG", "time": "11:24", "topic": "Classe Richedit", "username": "Enrico Maria Giordano" } ]
Classe Richedit
[ { "date": "2007-09-03", "forum": "All products support", "text": "Io uso FWH 7.04 + Harbour + BCC55.\nForse è un problema di Harbour ...\n\nPier Luigi", "time": "12:41", "topic": "Classe Richedit", "username": "Pier Luigi" } ]
Classe Richedit
[ { "date": "2007-09-03", "forum": "All products support", "text": "Provato anche con Harbour (sempre ultima versione dal CVS): nessun problema.\n\nEMG", "time": "13:04", "topic": "Classe Richedit", "username": "Enrico Maria Giordano" } ]
Classe Richedit
[ { "date": "2007-09-03", "forum": "All products support", "text": "Anche con l'ultima versione di Harbour intercetto lo stesso errore.\nD'altra parte, la funzione Resetoleuninit() (che provoca l'errore) è contenuta nella libreria FIVEH.LIB.\n\nA questo punto dovrei acquistare l'ultima versione di FWH <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> \n\nPier Luigi", "time": "14:06", "topic": "Classe Richedit", "username": "Pier Luigi" } ]
Classe Richedit
[ { "date": "2016-03-16", "forum": "FiveWin para Harbour/xHarbour", "text": "Olá\n\nAlguém tem a classe TFirebird do Rodrigo Moreno para xHarbour 123 com Bcc 7, tentei contato com ele, mas ele não respondeu meus emails, sei que tem uma classe nova, estou precisando urgente dela.", "time": "17:32", "topic": "Classe TFirebird para xHarbour 123 com Borland 7", "username": "Joao Cezar" } ]
Classe TFirebird para xHarbour 123 com Borland 7
[ { "date": "2016-03-16", "forum": "FiveWin para Harbour/xHarbour", "text": "Joao,\n\nAqui tienes una que publicó William, por si te sirve:\n\n<!-- l --><a class=\"postlink-local\" href=\"http://forums.fivetechsupport.com/viewtopic.php?p=60182#p60182\">viewtopic.php?p=60182#p60182</a><!-- l -->", "time": "22:22", "topic": "Classe TFirebird para xHarbour 123 com Borland 7", "username": "Antonio Linares" } ]
Classe TFirebird para xHarbour 123 com Borland 7
[ { "date": "2023-12-07", "forum": "FiveWin para Harbour/xHarbour", "text": "Olá, boa tarde!\n\nExiste alguma definição especifica do GIF para utilizar a classe TGif? \n\nAtt.,\n\nOliveiros Junior", "time": "21:00", "topic": "Classe TGif", "username": "oliveiros junior" } ]
Classe TGif
[ { "date": "2023-12-08", "forum": "FiveWin para Harbour/xHarbour", "text": "Dear Oliveiros,\n\nThe kind of GIF file that is needed is a standard GIF file that follows the GIF89a specification. This means that the GIF file should have the following characteristics:\n\nIt should have a header that identifies the file as a GIF file and specifies the version of the format. The header should be six bytes long and contain the ASCII characters “GIF89a”\n\nIt should have a logical screen descriptor that defines the dimensions and properties of the logical screen. The logical screen descriptor should be seven bytes long and contain the following fields: logical screen width, logical screen height, global color table flag, color resolution, sort flag, size of global color table, background color index, and pixel aspect ratio\n\nIt should have a global color table that contains the colors used in the image. The global color table should be present if the global color table flag is set to 1 in the logical screen descriptor. The size of the global color table should be 2^(size of global color table + 1) bytes, where each byte represents one color component (red, green, or blue) of a color.\n\nIt should have one or more image descriptors that define the dimensions and properties of each image in the file. The image descriptor should start with a byte containing the ASCII character “,”, followed by the following fields: image left position, image top position, image width, image height, local color table flag, interlace flag, sort flag, size of local color table, and local color table (optional).\n\nIt should have one or more image data blocks that contain the compressed pixel data of each image in the file. The image data blocks should start with a byte containing the LZW minimum code size, followed by one or more sub-blocks of data. Each sub-block should start with a byte containing the size of the sub-block, followed by the actual data bytes. The last sub-block should have a size of zero, indicating the end of the image data\n\nIt should have one or more graphic control extensions that specify the animation parameters of each image in the file. The graphic control extension should start with a byte containing the ASCII character “!”, followed by a byte containing the value 249, followed by a byte containing the block size (usually 4), followed by the following fields: reserved, disposal method, user input flag, transparent color flag, delay time, transparent color index, and block terminator (a byte containing the value 0\n\nIt should have an application extension that specifies the looping behavior of the animation. The application extension should start with a byte containing the ASCII character “!”, followed by a byte containing the value 255, followed by a byte containing the block size (usually 11), followed by the application identifier (“NETSCAPE”), followed by the application authentication code (“2.0”), followed by a sub-block containing the loop count, followed by a block terminator (a byte containing the value 0)\n\nIt should have a trailer that marks the end of the file. The trailer should be a single byte containing the ASCII character “;”", "time": "09:22", "topic": "Classe TGif", "username": "Antonio Linares" } ]
Classe TGif
[ { "date": "2023-12-08", "forum": "FiveWin para Harbour/xHarbour", "text": "[quote=\"oliveiros junior\":2fjibasv]Olá, boa tarde!\n\nExiste alguma definição especifica do GIF para utilizar a classe TGif? \n\nAtt.,\n\nOliveiros Junior[/quote:2fjibasv]\n\ncaro, explique: \"definição especifica\" ??\n\nO que você quer saber realmente?\n\nObg. abs.\n\nRegards, saludos.", "time": "15:20", "topic": "Classe TGif", "username": "karinha" } ]
Classe TGif
[ { "date": "2023-12-08", "forum": "FiveWin para Harbour/xHarbour", "text": "Thanks master Antonio.", "time": "16:57", "topic": "Classe TGif", "username": "oliveiros junior" } ]
Classe TGif
[ { "date": "2023-12-08", "forum": "FiveWin para Harbour/xHarbour", "text": "Olá Karinha,\n\nTenho um gif que não roda de jeito nenhum com a TGif. Ao executar, ele sai do sistema sem gerar nenhuma mensagem. Vou verificar com quem fez o gif se ele atende as especificações citadas pelo Antônio Linhares acima.\n\nObrigado pela atenção.\n\nOliveiros Junior", "time": "17:00", "topic": "Classe TGif", "username": "oliveiros junior" } ]
Classe TGif
[ { "date": "2023-12-08", "forum": "FiveWin para Harbour/xHarbour", "text": "Oliveiros, como você está fazendo?\n\n[code=fw:1w6h777t]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"FiveWin.ch\"</span><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"gif.ch\"</span><br /><br /><span style=\"color: #00C800;\">function</span> Main<span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oDlg<br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">DEFINE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">TITLE</span> <span style=\"color: #ff0000;\">\"Attention\"</span><br /><br />&nbsp; &nbsp;@ <span style=\"color: #000000;\">2</span>, <span style=\"color: #000000;\">11</span> <span style=\"color: #0000ff;\">SAY</span> <span style=\"color: #ff0000;\">\"Waiting to use the calculator\"</span><br /><br />&nbsp; &nbsp;<span style=\"color: #0000ff;\">ACTIVATE</span> <span style=\"color: #0000ff;\">DIALOG</span> oDlg <span style=\"color: #0000ff;\">CENTERED</span> ;<br />&nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">ON</span> <span style=\"color: #0000ff;\">INIT</span> PlaceGif<span style=\"color: #000000;\">&#40;</span> oDlg <span style=\"color: #000000;\">&#41;</span><br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br /><span style=\"color: #00C800;\">function</span> PlaceGif<span style=\"color: #000000;\">&#40;</span> oDlg <span style=\"color: #000000;\">&#41;</span><br /><br />&nbsp; &nbsp;<span style=\"color: #00C800;\">local</span> oGif<br /><br />&nbsp; &nbsp;@ <span style=\"color: #000000;\">19</span>, <span style=\"color: #000000;\">10</span> GIF oGif FILENAME <span style=\"color: #ff0000;\">\"..<span style=\"color: #000000;\">\\g</span>ifs<span style=\"color: #000000;\">\\l</span>oading.gif\"</span> <span style=\"color: #0000ff;\">OF</span> oDlg<br /><br /><span style=\"color: #00C800;\">return</span> <span style=\"color: #00C800;\">nil</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// &nbsp;LOCAL oGif</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// @ 61.50, 0 &nbsp;GIF oGif FILE \".\\AMBIENTY.GIF\" SIZE 230, 100 ADJUST</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">/*<br />&nbsp; &nbsp;IF FILE( \"AMBIENTY.GIF\" )<br /><br />&nbsp; &nbsp; &nbsp; @ 54.00, 01 GIF oGif FILE \".\\AMBIENTY.GIF\" SIZE 1019, 240 ADJUST<br /><br />&nbsp; &nbsp; &nbsp; // TELA CHEIA<br />&nbsp; &nbsp; &nbsp; // @ 54.00, 01 GIF oGif FILE \".\\AMBIENTY.GIF\" SIZE 1019, 582 ADJUST<br /><br />&nbsp; &nbsp; &nbsp; oGif:lTransparent := .T.<br /><br />&nbsp; &nbsp;ENDIF<br />&nbsp; &nbsp;*/</span><br /><br />&nbsp; &nbsp;<span style=\"color: #B900B9;\">// &nbsp; @ 050, 900 GIF oGif FILE \".\\HALO.GIF\" SIZE 090, 080 ADJUST OF oRebar</span><br /><br /><span style=\"color: #0000ff;\">Abs</span>.<br />&nbsp;</div>[/code:1w6h777t]\n\nRegards, saludos.", "time": "17:23", "topic": "Classe TGif", "username": "karinha" } ]
Classe TGif
[ { "date": "2023-12-08", "forum": "FiveWin para Harbour/xHarbour", "text": "Antonio, Gracias por le explicación\npero solo queremos saber como\nse programan en FWH <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> <!-- s:) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":)\" title=\"Smile\" /><!-- s:) --> <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> <!-- s:o --><img src=\"{SMILIES_PATH}/icon_surprised.gif\" alt=\":o\" title=\"Surprised\" /><!-- s:o --> <!-- s:shock: --><img src=\"{SMILIES_PATH}/icon_eek.gif\" alt=\":shock:\" title=\"Shocked\" /><!-- s:shock: -->", "time": "22:28", "topic": "Classe TGif", "username": "sysctrl2" } ]
Classe TGif
[ { "date": "2023-12-09", "forum": "FiveWin para Harbour/xHarbour", "text": "FWH\\samples\\testgif.prg, testgif2.prg, testgifr.prg", "time": "09:23", "topic": "Classe TGif", "username": "Antonio Linares" } ]
Classe TGif
[ { "date": "2023-12-09", "forum": "FiveWin para Harbour/xHarbour", "text": "Olá Karinha,\n\nEu peguei os exemplos testgif.prg, testgif2.prg, testgifr.prg e apenas troquei o nome do meu gif e coloquei gif na pasta gifs. Ele compila mas não executa o programa.\n\nAtt.,\n\nOliveiros Junior", "time": "13:46", "topic": "Classe TGif", "username": "oliveiros junior" } ]
Classe TGif
[ { "date": "2023-12-10", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola a todos.\n\nAntonio, eso si es una magnifica explicación técnica de 10. <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D --> \n\nYo, documentando y verificando que todo estaba correcto de este programa pReproducir ver 1.5 32bits que en breve subiré para que se pueda descargar, me paso lo mismo que a oliveiros junior. Una de las noches se me ocurrió cambiar el Gif de fondo blanco a otro de fondo negro, hice una copia de seguridad y sin probarlo lo deje. Al día siguiente ejecuto el programa y se cerraba automáticamente sin errores cuando el día anterior funciona perfectamente. No tenia ni idea que pasaba cuando el código estaba perfecto. Estuve probando de todo durante un par de horas y nada, hasta que decidí dejarlo todo exactamente igual a cuando funcionaba todo perfecto. Yo uso el Gif para emular un grafico de sonido y es la leche porque con los métodos puedes iniciarlo, pararlo, etc, cuando cambia de canción automáticamente, detenerlo, en espera o pararlo el programa lo detiene, lo para o deja que continúe. El truco es magnifico. \n\n[b:2jez93m9]Cual era el problema[/b:2jez93m9], pues sencillamente el archivo GIF. no son todos validos para FWH y ahora entenderéis la extensa explicación de Antonio. La clase funciona perfecta, si tenéis este problema es el GIF.\n\noliveiros junior, tu problema es el GIF.\n\nImagen1:\n[img:2jez93m9]https&#58;//i&#46;postimg&#46;cc/fySCQzNK/preproducir1&#46;jpg[/img:2jez93m9]\n\nYo estoy usando como reproductor de música mi programa usando ActiveX con el API de WMP ( windows media player ). Según microsoft se queda como reproductor para windows 11 y posteriores. \n\nEspero que os sirva la explicación.\nUn abrazo;\nJavier Lloris\n<!-- e --><a href=\"mailto:[email protected]\">[email protected]</a><!-- e -->\n\nBlogs personales:\nProgramación: <!-- m --><a class=\"postlink\" href=\"https://javierlloris.blogspot.com/\">https://javierlloris.blogspot.com/</a><!-- m -->\nJaponés: <!-- m --><a class=\"postlink\" href=\"https://bitacorajaponesa.blogspot.com/\">https://bitacorajaponesa.blogspot.com/</a><!-- m -->\nCubos de Rubik: <!-- m --><a class=\"postlink\" href=\"https://www.instagram.com/jllorisperson\">https://www.instagram.com/jllorisperson</a><!-- m --> ... 2ybz0gmvul\nTengo una colección de unos 100 cubos de todo tipo de formas geométricas, todos resueltos, en instagram solo hay unos cuentos cubos.", "time": "21:29", "topic": "Classe TGif", "username": "jll-fwh" } ]
Classe TGif
[ { "date": "2010-03-30", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola a todo el mundo.\n\nSeria posible, modificar la classe TOutLook2003, con los colores de 2007 ?\n\nMuchas gracias.", "time": "08:53", "topic": "Classe TOutLook2003 como 2007", "username": "pcordonet" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-03-30", "forum": "FiveWin para Harbour/xHarbour", "text": "Pedro,\n\nAl inicio del código fuente de la clase TOutLook2003 estan estas líneas:\n\n[code=fw:3cwtzoxt]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#define</span> LIGHTBLUE &nbsp; &nbsp;nRGB<span style=\"color: #000000;\">&#40;</span> &nbsp;<span style=\"color: #000000;\">89</span>, <span style=\"color: #000000;\">135</span>, <span style=\"color: #000000;\">214</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> DARKBLUE &nbsp; &nbsp; nRGB<span style=\"color: #000000;\">&#40;</span> &nbsp; <span style=\"color: #000000;\">3</span>, &nbsp;<span style=\"color: #000000;\">56</span>, <span style=\"color: #000000;\">147</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> LIGHTORANGE1 nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">250</span>, <span style=\"color: #000000;\">227</span>, <span style=\"color: #000000;\">143</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> DARKORANGE1 &nbsp;nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">238</span>, <span style=\"color: #000000;\">152</span>, <span style=\"color: #000000;\">25</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> LIGHTCYAN &nbsp; &nbsp;nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">203</span>, <span style=\"color: #000000;\">225</span>, <span style=\"color: #000000;\">252</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> DARKCYAN &nbsp; &nbsp; nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">125</span>, <span style=\"color: #000000;\">165</span>, <span style=\"color: #000000;\">224</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> LIGHTORANGE2 nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">220</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> DARKORANGE2 &nbsp;nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">247</span>, <span style=\"color: #000000;\">192</span>, <span style=\"color: #000000;\">91</span> <span style=\"color: #000000;\">&#41;</span><br />&nbsp;</div>[/code:3cwtzoxt]\n\nSólo tienes que modificar esos valores numéricos y recompilar outl2003.prg y enlazarlo como si fuese un PRG más de tu aplicación", "time": "10:36", "topic": "Classe TOutLook2003 como 2007", "username": "Antonio Linares" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-03-30", "forum": "FiveWin para Harbour/xHarbour", "text": "Muchas gracias Antonio, ya esta resuelto.", "time": "17:36", "topic": "Classe TOutLook2003 como 2007", "username": "pcordonet" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-03-31", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola:\n\n¿Cuál son esos valores?.\n\nMuchas gracias", "time": "11:45", "topic": "Classe TOutLook2003 como 2007", "username": "mgsoft" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-03-31", "forum": "FiveWin para Harbour/xHarbour", "text": "No solo he modificado valores sino que he modificado la clase con una propiedad l2007.\nTambién he cambiado Gradient por gradientfull. \n\nNo esta perfecto pero da el pego.\n\nLos cambios me he mirado la clase \"TRBtn\"\n\nen la Cabecera añadir \n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00D7D7;\">#include</span> <span style=\"color: #ff0000;\">\"Colors.ch\"</span><br /><br /><span style=\"color: #B900B9;\">// Colors Office 2007</span><br /><span style=\"color: #00D7D7;\">#define</span> BLUEBOX0     RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">141</span>, <span style=\"color: #000000;\">178</span>, <span style=\"color: #000000;\">227</span> <span style=\"color: #000000;\">&#41;</span>      <br /><span style=\"color: #00D7D7;\">#define</span> BLUEBOX1     RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">197</span>, <span style=\"color: #000000;\">210</span>, <span style=\"color: #000000;\">223</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> BLUEBOX2     RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">237</span>, <span style=\"color: #000000;\">242</span>, <span style=\"color: #000000;\">248</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00D7D7;\">#define</span> BLUE0        RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">218</span>, <span style=\"color: #000000;\">229</span>, <span style=\"color: #000000;\">243</span> <span style=\"color: #000000;\">&#41;</span>      <br /><span style=\"color: #00D7D7;\">#define</span> BLUE1        RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">199</span>, <span style=\"color: #000000;\">216</span>, <span style=\"color: #000000;\">237</span> <span style=\"color: #000000;\">&#41;</span>      <br /><span style=\"color: #00D7D7;\">#define</span> BLUE2        RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">194</span>, <span style=\"color: #000000;\">217</span>, <span style=\"color: #000000;\">240</span> <span style=\"color: #000000;\">&#41;</span>      <br /><span style=\"color: #00D7D7;\">#define</span> BLUE3        RGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">191</span>, <span style=\"color: #000000;\">219</span>, <span style=\"color: #000000;\">255</span> <span style=\"color: #000000;\">&#41;</span><br /><br /> </div>[/code:263lum81]\n\nEn las propiedades de la Clase (TOutLook2003)\n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />    <span style=\"color: #00C800;\">DATA</span>  l2007  <span style=\"color: #0000ff;\">INIT</span> .F.<br /> </div>[/code:263lum81]\n\n\nEn el Metodo (METHOD Paint() CLASS TOutLook2003)\nDeclarar variable\n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">Local</span> aGrad<br /> </div>[/code:263lum81]\nDonde\n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />Gradient<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, <span style=\"color: #000000;\">&#123;</span> nTop, <span style=\"color: #000000;\">0</span>, nTop + <span style=\"color: #000000;\">7</span>, ::<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span>, DARKBLUE, LIGHTBLUE, .T. <span style=\"color: #000000;\">&#41;</span>            <br /> </div>[/code:263lum81]\nReemplazar por \n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">If</span> ::<span style=\"color: #000000;\">l2007</span><br />   aGrad         := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">0.3</span>, BLUE0, BLUE0 <span style=\"color: #000000;\">&#125;</span>, <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">0.7</span>, BLUE1, BLUE0 <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br />   GradientFill<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, nTop , <span style=\"color: #000000;\">0</span>, nTop + <span style=\"color: #000000;\">7</span>, ::<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> , aGrad <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Else</span>   <br />   Gradient<span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">hDC</span>, <span style=\"color: #000000;\">&#123;</span> nTop, <span style=\"color: #000000;\">0</span>, nTop + <span style=\"color: #000000;\">7</span>, ::<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span>, DARKBLUE, LIGHTBLUE, .T. <span style=\"color: #000000;\">&#41;</span>            <br /><span style=\"color: #00C800;\">EndIf</span><br /> </div>[/code:263lum81]\n\nEn las propiedades de la clase TOutLook2003Group\n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />   <span style=\"color: #00C800;\">DATA</span>   l2007     <span style=\"color: #0000ff;\">INIT</span> .F.<br /> </div>[/code:263lum81]\n\nEn el método (METHOD Paint( lOver ) CLASS TOutLook2003Group)\nDeclarar variables\n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">local</span> aGrad,aGradHigh,aGradOver<br /> </div>[/code:263lum81]\nDonde\n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br />   Gradient<span style=\"color: #000000;\">&#40;</span> hDC := oCon:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#123;</span> nTop, <span style=\"color: #000000;\">0</span>, nTop + <span style=\"color: #000000;\">30</span>, oCon:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span>,;<br />             <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lOver, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lSelected</span>, ::<span style=\"color: #000000;\">nClrEnd</span>, LIGHTORANGE2 <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">nClrStart</span> <span style=\"color: #000000;\">&#41;</span>,;<br />             <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lOver, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lSelected</span>, ::<span style=\"color: #000000;\">nClrStart</span>, DARKORANGE2 <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">nClrEnd</span> <span style=\"color: #000000;\">&#41;</span>, .T. <span style=\"color: #000000;\">&#41;</span>            <br /> </div>[/code:263lum81]\n\nReemplazar por\n[code=fw:263lum81]<div class=\"fw\" id=\"{CB}\" style=\"font-family: monospace;\"><br /><span style=\"color: #00C800;\">If</span> ::<span style=\"color: #000000;\">l2007</span><br />    aGrad         := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">0.3</span>, BLUE0, BLUE0 <span style=\"color: #000000;\">&#125;</span>, <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">0.7</span>, BLUE1, BLUE0 <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br />    aGradHigh     := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">1</span>/<span style=\"color: #000000;\">3</span>, nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">253</span>,<span style=\"color: #000000;\">212</span>,<span style=\"color: #000000;\">168</span> <span style=\"color: #000000;\">&#41;</span>, nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">251</span>,<span style=\"color: #000000;\">178</span>,<span style=\"color: #000000;\">99</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span>, <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">2</span>/<span style=\"color: #000000;\">3</span>, nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">250</span>,<span style=\"color: #000000;\">157</span>,<span style=\"color: #000000;\">52</span> <span style=\"color: #000000;\">&#41;</span>, nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">252</span>,<span style=\"color: #000000;\">234</span>,<span style=\"color: #000000;\">163</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br />    aGradOver     := <span style=\"color: #000000;\">&#123;</span> <span style=\"color: #000000;\">&#123;</span><span style=\"color: #000000;\">1</span> , nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>,<span style=\"color: #000000;\">215</span>,<span style=\"color: #000000;\">84</span><span style=\"color: #000000;\">&#41;</span>, nRGB<span style=\"color: #000000;\">&#40;</span> <span style=\"color: #000000;\">255</span>, <span style=\"color: #000000;\">253</span>, <span style=\"color: #000000;\">222</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span> <span style=\"color: #000000;\">&#125;</span><br />    GradientFill<span style=\"color: #000000;\">&#40;</span> hDC := oCon:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> , nTop, <span style=\"color: #000000;\">0</span>, nTop + <span style=\"color: #000000;\">30</span>, oCon:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> , <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lOver, aGradOver , <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lSelected</span> , aGradHigh , aGrad<span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#41;</span><br /><span style=\"color: #00C800;\">Else</span><br />    Gradient<span style=\"color: #000000;\">&#40;</span> hDC := oCon:<span style=\"color: #000000;\">GetDC</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span>, <span style=\"color: #000000;\">&#123;</span> nTop, <span style=\"color: #000000;\">0</span>, nTop + <span style=\"color: #000000;\">30</span>, oCon:<span style=\"color: #000000;\">nWidth</span><span style=\"color: #000000;\">&#40;</span><span style=\"color: #000000;\">&#41;</span> <span style=\"color: #000000;\">&#125;</span>,;<br />             <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lOver, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lSelected</span>, ::<span style=\"color: #000000;\">nClrEnd</span>, LIGHTORANGE2 <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">nClrStart</span> <span style=\"color: #000000;\">&#41;</span>,;<br />             <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> lOver, <span style=\"color: #00C800;\">If</span><span style=\"color: #000000;\">&#40;</span> ::<span style=\"color: #000000;\">lSelected</span>, ::<span style=\"color: #000000;\">nClrStart</span>, DARKORANGE2 <span style=\"color: #000000;\">&#41;</span>, ::<span style=\"color: #000000;\">nClrEnd</span> <span style=\"color: #000000;\">&#41;</span>, .T. <span style=\"color: #000000;\">&#41;</span>            <br /><span style=\"color: #00C800;\">EndIf</span><br /> </div>[/code:263lum81]\n\n\nEspero que también te funcione mas o menos bien.\n\nGracias.\nPere", "time": "12:10", "topic": "Classe TOutLook2003 como 2007", "username": "pcordonet" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-04-05", "forum": "FiveWin para Harbour/xHarbour", "text": "Pere,\n\nPuedes poner una imagen aqui de como ha quedado ? <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->\n\nUsa <!-- w --><a class=\"postlink\" href=\"http://www.imageshack.us\">www.imageshack.us</a><!-- w -->", "time": "07:57", "topic": "Classe TOutLook2003 como 2007", "username": "Antonio Linares" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-04-06", "forum": "FiveWin para Harbour/xHarbour", "text": "Hola Antonio, \n\nAquí tienes una imagen de como ha quedado.\n\n\n[img:3vokqlvm]http&#58;//img202&#46;imageshack&#46;us/img202/2843/toutlook2003&#46;png[/img:3vokqlvm]\n\na ver si te parece bien.\nGracias.", "time": "10:03", "topic": "Classe TOutLook2003 como 2007", "username": "pcordonet" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-04-07", "forum": "FiveWin para Harbour/xHarbour", "text": "Pere,\n\nGracias por poner la imagen,\n\nsi, se ve bien <!-- s:-) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":-)\" title=\"Smile\" /><!-- s:-) -->", "time": "08:24", "topic": "Classe TOutLook2003 como 2007", "username": "Antonio Linares" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-04-07", "forum": "FiveWin para Harbour/xHarbour", "text": "Antonio:\n\n¿Y por qué los botones look 2007 no se ven como el azul de esa foto?.\n\ngracias <!-- s:D --><img src=\"{SMILIES_PATH}/icon_biggrin.gif\" alt=\":D\" title=\"Very Happy\" /><!-- s:D -->", "time": "10:45", "topic": "Classe TOutLook2003 como 2007", "username": "mgsoft" } ]
Classe TOutLook2003 como 2007
[ { "date": "2010-06-07", "forum": "FiveWin para Harbour/xHarbour", "text": "Muy interesante <!-- s:) --><img src=\"{SMILIES_PATH}/icon_smile.gif\" alt=\":)\" title=\"Smile\" /><!-- s:) -->", "time": "06:05", "topic": "Classe TOutLook2003 como 2007", "username": "AIDA" } ]
Classe TOutLook2003 como 2007
[ { "date": "2007-03-20", "forum": "FiveWin para Harbour/xHarbour", "text": "É possível utilizando a classe tprogress que apareça o sinal de %, igual é utilizando o METER?\n\nEX?\n\n===..........10%............\n\naokisantos", "time": "01:59", "topic": "Classe TPROGRESS com sinal de % é possível?", "username": "AOKISANTOS" } ]
Classe TPROGRESS com sinal de % é possível?
[ { "date": "2007-03-20", "forum": "FiveWin para Harbour/xHarbour", "text": "Aokisantos,\n\nNo, el API de Windows no muestra el porcentaje en ese control", "time": "08:33", "topic": "Classe TPROGRESS com sinal de % é possível?", "username": "Antonio Linares" } ]
Classe TPROGRESS com sinal de % é possível?
[ { "date": "2007-03-20", "forum": "FiveWin para Harbour/xHarbour", "text": "gracias", "time": "12:59", "topic": "Classe TPROGRESS com sinal de % é possível?", "username": "AOKISANTOS" } ]
Classe TPROGRESS com sinal de % é possível?
[ { "date": "2006-04-03", "forum": "FiveWin para Harbour/xHarbour", "text": "Bueno amigos mi consulta es la siguiente como puedo imprimir con la classe TPrinter en un boleta de venta de 7 cm ancho y 15 largo. yo en clipper lo haci asi:\n\nSetPrc(0,0) \nDo While .Not. Eof()\n @ fila,5 Say ....\n @ fila,10 say ...\n skip\nenddo\ncomo lo hago con la clase TPrinter", "time": "17:09", "topic": "Classe TPrinter", "username": "jbrita" } ]
Classe TPrinter
[ { "date": "2006-04-03", "forum": "FiveWin para Harbour/xHarbour", "text": "tienes que crear el objeto de la tprinter\ndefine printer oprn bla bla bla\ny en lugar del @ te recomiendo imprimas en centimetros\npage\ndo while .t.\n oprn:cmsay(2,2,\"mi impresion\")\n skip\nenddo\nendpage\nendprint\nnomas que asi te brinca como si fuera hoja tamaño carta\nsi tu largo es menos, no recuerdo la forma de configurar a ese largo exactamente prueba con PrnSetSize( 25000, 11500 ) que es Ancho,Alto.\nPero tiene varios formatos definidos, por si alguno te sirve por ejemplo\n\nSETPAGE(9) es formato A4\n\nDMPAPER_LETTER 1 // Letter 8 1/2 x 11 in \nDMPAPER_LETTERSMALL 2 // Letter Small 8 1/2 x 11 in \nDMPAPER_TABLOID 3 // Tabloid 11 x 17 in \nDMPAPER_LEDGER 4 // Ledger 17 x 11 in \nDMPAPER_LEGAL 5 // Legal 8 1/2 x 14 in \nDMPAPER_STATEMENT 6 // Statement 5 1/2 x 8 1/2 in \nDMPAPER_EXECUTIVE 7 // Executive 7 1/4 x 10 1/2 in \nDMPAPER_A3 8 // A3 297 x 420 mm \nDMPAPER_A4 9 // A4 210 x 297 mm \nDMPAPER_A4SMALL 10 // A4 Small 210 x 297 mm \nDMPAPER_A5 11 // A5 148 x 210 mm \nDMPAPER_B4 12 // B4 250 x 354 \nDMPAPER_B5 13 // B5 182 x 257 mm \nDMPAPER_FOLIO 14 // Folio 8 1/2 x 13 in \nDMPAPER_QUARTO 15 // Quarto 215 x 275 mm \nDMPAPER_10X14 16 // 10x14 in \nDMPAPER_11X17 17 // 11x17 in \nDMPAPER_NOTE 18 // Note 8 1/2 x 11 in \nDMPAPER_ENV_9 19 // Envelope #9 3 7/8 x 8 7/8 \nDMPAPER_ENV_10 20 // Envelope #10 4 1/8 x 9 1/2 \nDMPAPER_ENV_11 21 // Envelope #11 4 1/2 x 10 3/8 \nDMPAPER_ENV_12 22 // Envelope #12 4 \\276 x 11 \nDMPAPER_ENV_14 23 // Envelope #14 5 x 11 1/2 \nDMPAPER_CSHEET 24 // C size sheet \nDMPAPER_DSHEET 25 // D size sheet \nDMPAPER_ESHEET 26 // E size sheet \nDMPAPER_ENV_DL 27 // Envelope DL 110 x 220mm \nDMPAPER_ENV_C5 28 // Envelope C5 162 x 229 mm \nDMPAPER_ENV_C3 29 // Envelope C3 324 x 458 mm \nDMPAPER_ENV_C4 30 // Envelope C4 229 x 324 mm \nDMPAPER_ENV_C6 31 // Envelope C6 114 x 162 mm \nDMPAPER_ENV_C65 32 // Envelope C65 114 x 229 mm \nDMPAPER_ENV_B4 33 // Envelope B4 250 x 353 mm \nDMPAPER_ENV_B5 34 // Envelope B5 176 x 250 mm \nDMPAPER_ENV_B6 35 // Envelope B6 176 x 125 mm \nDMPAPER_ENV_ITALY 36 // Envelope 110 x 230 mm \nDMPAPER_ENV_MONARCH 37 // Envelope Monarch 3.875 x 7.5 in \nDMPAPER_ENV_PERSONAL 38 // 6 3/4 Envelope 3 5/8 x 6 1/2 in \nDMPAPER_FANFOLD_US 39 // US Std Fanfold 14 7/8 x 11 in \nDMPAPER_FANFOLD_STD_GERMAN 40 // German Std Fanfold 8 1/2 x 12 in \nDMPAPER_FANFOLD_LGL_GERMAN 41 // German Legal Fanfold 8 1/2 x 13 in \n\nsaludos\npaco", "time": "19:25", "topic": "Classe TPrinter", "username": "Francisco Horta" } ]
Classe TPrinter
[ { "date": "2006-04-03", "forum": "FiveWin para Harbour/xHarbour", "text": "Utiliza la clase tDosPrn que puedes manipular las lineas y columnas como en clipper (si usas impresoras de matriz), yo utilizo esta clase para los formatos preimpresos y uso la clase Tprinter para los otros reportes.\n\nSaludos", "time": "23:23", "topic": "Classe TPrinter", "username": "Alvaro Urdaneta" } ]
Classe TPrinter
[ { "date": "2005-11-01", "forum": "All products support", "text": "Olá!\n\nQue classe vocês costumam usar para TreeView?\nPreciso fazer um cadastro em esquema de árvore (plano de contas), com opções de incluir, excluir e alterar item, tipo assim:\n\n 1--- DESPESAS\n +---- 1.1 DESPESAS ADMINISTRATIVAS\n +----- 1.1.1 Salarios\n +----- 1.1.2 Encargos\n +----- 1.1.3 Etc\n +---- 1.2 TAL COISA\n 2--- RECEITAS\n\nAtualmente tenho este cadastro em um listbox, mas a visualizacao nao da a noção de hierarquia das contas ao usuário...\n\n[ ]'s\nMaurilio", "time": "13:32", "topic": "Classe para TreeView", "username": "Maurilio Viana" } ]
Classe para TreeView
[ { "date": "2005-11-01", "forum": "All products support", "text": "dá uma olhada em <!-- w --><a class=\"postlink\" href=\"http://www.dbwide.com.ar\">www.dbwide.com.ar</a><!-- w --> .. lá tem uma classe TTree muito boa...", "time": "20:00", "topic": "Classe para TreeView", "username": "siscat" } ]
Classe para TreeView
[ { "date": "2005-11-10", "forum": "All products support", "text": "[quote=\"siscat\":2it7axib]dá uma olhada em <!-- w --><a class=\"postlink\" href=\"http://www.dbwide.com.ar\">www.dbwide.com.ar</a><!-- w --> .. lá tem uma classe TTree muito boa...[/quote:2it7axib]\n\nO site está fora do ar... <!-- s:( --><img src=\"{SMILIES_PATH}/icon_sad.gif\" alt=\":(\" title=\"Sad\" /><!-- s:( --> \n\n[ ]'s\nMaurilio", "time": "12:09", "topic": "Classe para TreeView", "username": "Maurilio Viana" } ]
Classe para TreeView
[ { "date": "2005-12-04", "forum": "All products support", "text": "Se encuentra ubicado ahora en:\n\n <!-- m --><a class=\"postlink\" href=\"http://vikthor.com.mx/fivewin/\">http://vikthor.com.mx/fivewin/</a><!-- m -->\n\nSaludos.", "time": "22:57", "topic": "Classe para TreeView", "username": "Canarias" } ]
Classe para TreeView
[ { "date": "2006-11-02", "forum": "FiveWin para Harbour/xHarbour", "text": "Olá,\n\nAlguém sabe se existe alguma classe para desenhar uma regua em uma window/dialog ?\n\n[img:mnenidqf]http&#58;//br&#46;geocities&#46;com/qiinformatica2000/regua&#46;png[/img:mnenidqf]\n\nObrigado,\n\nRossine.", "time": "15:03", "topic": "Classe para exibir regua (centometros)", "username": "Rossine" } ]
Classe para exibir regua (centometros)
[ { "date": "2006-11-02", "forum": "FiveWin para Harbour/xHarbour", "text": "THERE WAS TREGLA BUt I not know where u can download it \n\nPls ROssine can you send me at private email . Tanks", "time": "16:31", "topic": "Classe para exibir regua (centometros)", "username": "Silvio" } ]
Classe para exibir regua (centometros)
[ { "date": "2008-03-21", "forum": "FiveWin for Harbour/xHarbour", "text": "I have been programming in FiveWin, FWH and Harbour for a long time without really knowing what a class is? OK I'm not ashamed to admit I'm very thick, but could someone please explain how to use a class.prg file. I know there's lots of examples in FWH\\source\\classes\\*.prg, but what does one do with a new class.prg file?", "time": "16:35", "topic": "Classes ... anyone?", "username": "SteveLai" } ]
Classes ... anyone?
[ { "date": "2008-03-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Hello SteveLai,\n\n\n[img:i5jbyw72]http&#58;//www&#46;pflegeplus&#46;com/fw_downloads/object&#46;jpg[/img:i5jbyw72]\n\nI will show the Logic on a program, i'm just working on.\nThe Bar < Test > had before the same colours\nlike < Colour-Gradient >, i changed the values.\nAt start it shows default colors\nThe Vars => e_COLOR1, e_COLOR2 and e_COLTEXT\ni changed from the outside.\n\n[code:i5jbyw72]\n\n// ------------------------------------------------------------------------\n\nIF nCOLEND = \"111\" // Glass-Optik is shown\n REDEFINE INFOBAR oInfoBar2 ID 103 COLOR e_COLOR1 GLASS ;\n BITMAP e_BITMAP PROMPT SPACE&#40;e_POSLEFT&#41; + ; \n \"Test\" COLOR e_COLTEXT LEFT FONT oBFont ;\n OF oDlg5 UPDATE BORDER\nELSE\n IF nORIENT = \"1\" // Horizontal Color\n REDEFINE INFOBAR oInfoBar2 ID 103 GRADIENT e_COLOR1, ; \n e_COLOR2 HORIZONTAL ;\n BITMAP e_BITMAP PROMPT SPACE&#40;e_POSLEFT&#41; + ;\n \"Test\" COLOR e_COLTEXT LEFT FONT oBFont ;\n OF oDlg5 UPDATE BORDER\n ENDIF\n IF nORIENT = \"2\" // Vertical Color\n REDEFINE INFOBAR oInfoBar2 ID 103 GRADIENT e_COLOR1, ;\n e_COLOR2 BITMAP e_BITMAP ;\n PROMPT SPACE&#40;e_POSLEFT&#41; + \"Test\" COLOR e_COLTEXT ;\n LEFT FONT oBFont OF oDlg5 UPDATE BORDER\n ENDIF\nENDIF\n\n// When i press this Button, i want to show new values\n// ---------------------------------------------------------------------\nREDEFINE BUTTONBMP oBtn9 ID 601 OF oDlg5 ;\nACTION &#40; NEW_COLOR&#40;oInfoBar2&#41; &#41; ;\nBITMAP \"colors\" PROMPT SPACE&#40;5&#41; + \"&Test\" TEXTRIGHT\noBtn9&#58;cToolTip = &#123; \"Bar-Color-Test\", \"Test\", 1, CLR_BLACK, 14089979 &#125; \n\n&#46;&#46;&#46;&#46;&#46;\n&#46;&#46;&#46;&#46;&#46;\n\n//------------------------------\n\nFUNCTION NEW_COLOR&#40;oInfoBar2&#41;\n\nWhen you want to use CLASS - informations,\nthe function must know the OBJECT &#40; oInfoBar2 &#41;&#46;\nThe functions are allways belong to a OBJECT &#40; in this sample => oInfobar2 &#41;\ne_COLTEXT, e_COLOR1 and e_COLOR2 have the new values i want to test&#46;\n\n\noInfoBar2&#58;cPrompt &#58;= \"Test\" // Write \"Test\" to the Var => cPrompt \noInfoBar2&#58;oFontPrompt &#58;= oBFont // Show a try-out Font for the Text\noInfoBar2&#58;nClrPrompt &#58;= e_COLTEXT // Show a try-out Color for the Text\n\nIF e_COLEND = 9 // Glass - look\n oInfoBar2&#58;nClrLabel &#58;= e_COLOR1 // Show a try-out Color for the text\n oInfoBar2&#58;lDrawGradient &#58;= &#46;F&#46;\n oInfoBar2&#58;lGlass &#58;= &#46;T&#46;\nELSE\n oInfoBar2&#58;nBeginColor &#58;= e_COLOR1 // Show a Color Start-Grad&#46;\n oInfoBar2&#58;nEndColor &#58;= e_COLOR2 // Show a Color End-Grad\n IF e_ORIENT = 1\n oInfoBar2&#58;lVertGradient &#58;= &#46;F&#46;\n ENDIF\n IF e_ORIENT = 2\n oInfoBar2&#58;lVertGradient &#58;= &#46;T&#46;\n ENDIF\nENDIF\n\noInfoBar2&#58;Paint&#40;&#41; // METHOD Paint&#40;&#41;\noInfoBar2&#58;Refresh&#40;&#41; // REFRESH oInfoBar2\n\n// With this, the BAR => oInfoBar2 is UPDATED with the new Values !!!\n// You send directly informations to the OBJECT oInfobar2\n\nRETURN&#40; NIL &#41;\n\n\n\nSome Lines of the Class\n--------------------------------\n// On Top there are DATA\n// These are the used vars inside the CLASS\n// and can be modified from outside\n// see Function NEW_COLOR&#40;oInfoBar2&#41;\n\nDATA cPrompt \tAS CHARACTER\nDATA nClrPrompt \tAS NUMERIC\nDATA oFontPrompt\tAS OBJECT\nDATA nClrLabel \tAS NUMERIC \nDATA lDrawGradient AS LOGICAL\nDATA lGlass \tAS LOGICAL\nDATA lVertGradient AS LOGICAL\nDATA nBeginColor\tAS NUMERIC\nDATA nEndColor\tAS NUMERIC\n\n// These DATAS i have given new Values \n\n// Then you have METHOD &#40; Functions &#41;\n\nMETHOD Paint&#40;&#41; // I paint oInfoBar2 with the new values \n\n&#46;&#46;&#46;&#46;&#46;\n&#46;&#46;&#46;&#46;&#46;\n\n[/code:i5jbyw72]\n\nMaybe it shows the Logic a little bit.\n\nRegards\n\nUwe <!-- s:lol: --><img src=\"{SMILIES_PATH}/icon_lol.gif\" alt=\":lol:\" title=\"Laughing\" /><!-- s:lol: -->", "time": "18:25", "topic": "Classes ... anyone?", "username": "ukoenig" } ]
Classes ... anyone?
[ { "date": "2008-03-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Steve,\nSure you know about James „An Introduction to FiveWin“. (*****)\nI mention it here only in case if you don’t. \nRegards,\nOtto\n\n\n<!-- m --><a class=\"postlink\" href=\"http://ourworld.compuserve.com/homepages/jbott/fwintro.htm\">http://ourworld.compuserve.com/homepage ... wintro.htm</a><!-- m -->\n\n\n Intellitech does most of its software development in the FiveWin programming language. This section contains information primarily of interest to other FiveWin programmers. \n\nFeature Articles \n\n\nIntroduction to FiveWin\nAn article on programming in the FiveWin programming language. Discusses the basics: FiveWin, resources and resource editors, SDI & MDI windows, dialogs, menus, toolbars, message bars, buttons, colors, icons, etc. Also discusses the concept of a dataDialog class. Good for those just getting started with FiveWin and those considering FiveWin.\n\nIntroduction to Object-Oriented Programming Using FiveWin: Part I\nBasics of OOP including encapsulation, inheritance, polymorphism and granularity. Also discusses Fivewin's class syntax. \n\nIntroduction to Object-Oriented Programming Using FiveWin: Part II\nCovers class design with examples of building business object classes to emulate real-world business objects.", "time": "18:32", "topic": "Classes ... anyone?", "username": "Otto" } ]
Classes ... anyone?
[ { "date": "2008-03-21", "forum": "FiveWin for Harbour/xHarbour", "text": "Many thanks ukoenig ... I will study and try to understand your sample.\n\nThanks too Otto; I've read James Bott's guide and I think I can follow most of it.\n\n============???\nWhat I don't understand is how to create an EXE from a PRG file containing Function Main and another PRG file containing Create Class.\n\nFor instance, re Gale FORd's example on Google Map ...\n\n i.e. You can download this class and TestWebMap prg at \n <!-- m --><a class=\"postlink\" href=\"http://www.hotshare.net/file/24300-4713157df9.html\">http://www.hotshare.net/file/24300-4713157df9.html</a><!-- m --> \n\nThere is TestWebMap.prg for the Function Main and WebMap.prg for the Create Class; the resource is provided in TestWebMap.rc\n\nWhen I try to create the EXE, I get ...\nxLINK: error: Unresolved external symbol '??2@YAPAXI@Z'.\nxLINK: error: Unresolved external symbol '??3@YAXPAX@Z'.\nxLINK: fatal error: 2 unresolved external(s).\n\nI have tried combining the two files directly as well as #include one from another without success. I am not doing something right?\n\nAny words of wisdom will be much appreciated.", "time": "19:00", "topic": "Classes ... anyone?", "username": "SteveLai" } ]
Classes ... anyone?