topic
stringlengths
1
63
text
stringlengths
1
577k
BTNBMP from resource missing command COLOR ?
Mr. Rao, Your sample works fine. To change the textcolor as well I did the following changes with a included Setcolor() : [color=#0000FF:g3wsaczt]GRADIENT { |lMouseOver| If( lMouseOver, ( oBtn:SetColor( 16777215, ), 255 ), ;[/color:g3wsaczt] // red with white text [color=#0000FF:g3wsaczt]{ { 1, (oBtn:SetColor( 0, ), 3067734 ), 3067734 } } ) }[/color:g3wsaczt] // green with black text the gradient-solution [color=#0000FF:g3wsaczt]GRADIENT { | lMouseOver | If( ! lMouseOver, ;[/color:g3wsaczt] [color=#0000FF:g3wsaczt]( oBtn[1]:SetColor( 255, ), ;[/color:g3wsaczt] // red text [color=#0000FF:g3wsaczt]{ { 0.5, 3067734, 16777215 }, ;[/color:g3wsaczt] // gradient green - white [color=#0000FF:g3wsaczt]{ 0.5, 16777215, 3067734 } } ), ;[/color:g3wsaczt] [color=#0000FF:g3wsaczt]( oBtn[1]:SetColor( 8388608, ), ;[/color:g3wsaczt] // blue text [color=#0000FF:g3wsaczt]{ { 0.5, 255, 16777215 }, ;[/color:g3wsaczt] // gradient red - white [color=#0000FF:g3wsaczt]{ 0.5, 16777215, 255 } } ) ) } UPDATE[/color:g3wsaczt] It works but I am not sure if to keep it as the final solution. regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
BTNBMP from resource missing command COLOR ?
:nClrText := { |lMouseOver, oBtn| <color>( lMouseOver, oBtn ) }
BTNBMP from resource missing command COLOR ?
Thank You very much. much better and shorter now : [code=fw:3e8ssbpv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />GRADIENT <span style="color: #000000;">&#123;</span> |lMouseOver, oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lMouseOver, <span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">16777215</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, ;<br />        <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">0</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />--------------<br /><br />GRADIENT <span style="color: #000000;">&#123;</span> |lMouseOver, oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lMouseOver, ;<br /><span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">255</span>, ; <span style="color: #B900B9;">// red text</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">3067734</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// gradient green - white</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16777215</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br /><span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">255</span>, ; <span style="color: #B900B9;">// blue text </span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// gradient red - white</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16777215</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">UPDATE</span><br /><br /> </div>[/code:3e8ssbpv] regards Uwe
BTNBMP from resource missing command COLOR ?
Instead of: [code=fw:1c90boe0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />GRADIENT <span style="color: #000000;">&#123;</span> |lMouseOver, oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lMouseOver, <span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">16777215</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">0</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:1c90boe0] Recommended: [code=fw:1c90boe0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />GRADIENT <span style="color: #000000;">&#123;</span> |lMouseOver, oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lMouseOver, <span style="color: #000000;">255</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">&#123;</span> |lMouseOver,oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lMouseOver, <span style="color: #000000;">16777215</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:1c90boe0] Instead of: [code=fw:1c90boe0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />GRADIENT <span style="color: #000000;">&#123;</span> |lMouseOver, oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lMouseOver, ;<br /><span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">255</span>, ; <span style="color: #B900B9;">// red text</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">3067734</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// gradient green - white</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16777215</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br /><span style="color: #000000;">&#40;</span> oBtn:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">255</span>, ; <span style="color: #B900B9;">// blue text </span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// gradient red - white</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16777215</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">UPDATE</span><br />&nbsp;</div>[/code:1c90boe0] Recommended: [code=fw:1c90boe0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />GRADIENT <span style="color: #000000;">&#123;</span> |lMouseOver, oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ! lMouseOver, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">3067734</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// gradient green - white</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16777215</span>, <span style="color: #000000;">3067734</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">16777215</span> <span style="color: #000000;">&#125;</span>, ; <span style="color: #B900B9;">// gradient red - white</span><br /><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0.5</span>, <span style="color: #000000;">16777215</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />:<span style="color: #000000;">nClrText</span> := <span style="color: #000000;">&#123;</span> |lMouseOver, oBtn| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lMouseOver, CLR_HRED, CLR_BLUE <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />&nbsp;</div>[/code:1c90boe0]
BTNBMP lButtonDown
Hi to all! I need to trigger an action with the mouse left Button down (and not at the release) in a BTNBMP. Any help would be appreciated. TIA Euclides
BTNBMP lButtonDown
Euclides Try... oBtn:bLClicked = {|| MyAction() } and not define "ACTION" in button
BTNBMP lButtonDown
Danie, thanks for the answer, but... ... REDEFINE BTNBMP oBtn RESOURCE "RESOURCE" ID 100 OF oDlg oBtn:bLClicked = {|| MsgInfo(oBtn:lPressed) } ... does not execute (maybe is trapped somewhere before) Regards Euclides
BTNBMP lButtonDown
Euclides... i checked the class... and this behavior isn't supported sorry... you can try modify the class METHOD LButtonDown( nRow, nCol ) change to this line [code=fw:cecimkqr]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> ::<span style="color: #000000;">lDrag</span> .or. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDragCursor</span> <span style="color: #000000;">&#41;</span> .or. ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bLClicked</span> <span style="color: #000000;">&#41;</span></div>[/code:cecimkqr]
BTNBMP lButtonDown
OK, working as expected. Thanks Daniel! Regards Euclides
BTNBMP on Gradient in Resources the right way ?
Hello, After many tests, I could solve the problem, painting BTNBMP's inside Resources with all combinations. I'm not really shure, if there is maybe still another solution for it. I had to use two functions : 1. The normal Gradient-Painting on Dialogs 2. I used Antonio's Function, for the Gradient-painting on transparent Buttons. ( Without Antonio's Function, Buttons are not transparent. ) [code=fw:35e315a3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// nSTYLE = 2 => Gradient</span><br /><span style="color: #B900B9;">// D_MOVE => Color-Position</span><br /><span style="color: #B900B9;">// D_DIRECT => Horizontal or Vertical</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg4 <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">NOWAIT</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oDlg4:<span style="color: #0000ff;">Move</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">470</span>, <span style="color: #000000;">430</span>, <span style="color: #000000;">290</span>, .f. <span style="color: #000000;">&#41;</span>, DisableX<span style="color: #000000;">&#40;</span>oDlg4, .T.<span style="color: #000000;">&#41;</span>, ;<br />        oBtn1:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> D_BUTTONH * <span style="color: #000000;">2</span>, D_BUTTONV * <span style="color: #000000;">2</span>, .T. <span style="color: #000000;">&#41;</span>, ;<br />        oBtn2:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> D_BUTTONH * <span style="color: #000000;">2</span>, D_BUTTONV * <span style="color: #000000;">2</span>, .T. <span style="color: #000000;">&#41;</span>, ;<br />        oBtn3:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> D_BUTTONH * <span style="color: #000000;">2</span>, D_BUTTONV * <span style="color: #000000;">2</span>, .T. <span style="color: #000000;">&#41;</span>, ;<br />        oBtn4:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> D_BUTTONH * <span style="color: #000000;">2</span>, D_BUTTONV * <span style="color: #000000;">2</span>, .T. <span style="color: #000000;">&#41;</span>, ;<br />        oBtn5:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> D_BUTTONH * <span style="color: #000000;">2</span>, D_BUTTONV * <span style="color: #000000;">2</span>, .T. <span style="color: #000000;">&#41;</span>, ;<br />        oBtn6:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> D_BUTTONH * <span style="color: #000000;">2</span>, D_BUTTONV * <span style="color: #000000;">2</span>, .T. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> <span style="color: #000000;">&#40;</span> IIF<span style="color: #000000;">&#40;</span> nSTYLE = <span style="color: #000000;">2</span> .and. D_DIRECT = <span style="color: #000000;">1</span>, ;<br />   <span style="color: #000000;">&#40;</span> D_GRADIENT<span style="color: #000000;">&#40;</span> hDC, oDlg4 <span style="color: #000000;">&#41;</span>, ;<br />     GradientBrush<span style="color: #000000;">&#40;</span> oDlg4, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> D_MOVE, D_COLOR1, D_COLOR2 <span style="color: #000000;">&#125;</span>,;<br />     <span style="color: #000000;">&#123;</span> D_MOVE, D_COLOR2, D_COLOR1 <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, .T. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>, ;<br />    IIF<span style="color: #000000;">&#40;</span> nSTYLE = <span style="color: #000000;">2</span> .and. D_DIRECT = <span style="color: #000000;">2</span>, ;<br />   <span style="color: #000000;">&#40;</span> D_GRADIENT<span style="color: #000000;">&#40;</span> hDC, oDlg4 <span style="color: #000000;">&#41;</span>, ;<br />     GradientBrush<span style="color: #000000;">&#40;</span> oDlg4, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> D_MOVE, D_COLOR1, D_COLOR2 <span style="color: #000000;">&#125;</span>,;<br />     <span style="color: #000000;">&#123;</span> D_MOVE, D_COLOR2, D_COLOR1 <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>, .F. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>, ;<br />    IIF<span style="color: #000000;">&#40;</span> nSTYLE = <span style="color: #000000;">5</span>, DL_IMAGE<span style="color: #000000;">&#40;</span> hDC, oDlg4 <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>, ;<br />       D_ALPHA<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #B900B9;">// ---- The Buttons :</span><br /><span style="color: #B900B9;">// -----  1. Line, 1. Button  Transparent NOBORDER ---------</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg3 ;<br />NOBORDER ;<br />FILENAME c_path + <span style="color: #ff0000;">"<span style="color: #000000;">\p</span>roject<span style="color: #000000;">\"</span> + D_BUTTON1 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">1</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.1</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />RIGHT<br />oBtn1:lTransparent = .t.   <br />oBtn1:cTooltip := "</span>Button1<span style="color: #ff0000;">"<br /><br />// ----- 2. Line, 1. Button Transparent BORDER ---------<br /><br />REDEFINE BTNBMP oBtn4 ID 200 OF oDlg3 ;<br />FILENAME c_path + "</span>\project\<span style="color: #ff0000;">" + D_BUTTON1 ;<br />ACTION MsgAlert( "</span>Button-<span style="color: #0000ff;">Click</span><span style="color: #ff0000;">", "</span><span style="color: #0000ff;">Button</span> <span style="color: #000000;">4</span><span style="color: #ff0000;">" ) ;<br />PROMPT "</span>But<span style="color: #000000;">.4</span><span style="color: #ff0000;">" ;<br />FONT oButtFont ;<br />BOTTOM<br />oBtn4:lTransparent = .t.   <br />oBtn4:cTooltip := "</span>Button4<span style="color: #ff0000;">"<br /><br /><br />// -------------- DIALOG - GRADIENT --------------------<br /><br />STATIC FUNCTION D_GRADIENT( hDC, oDlg )<br />local aGrad := { { D_MOVE, D_COLOR1, D_COLOR2 }, ;  <br />                          { D_MOVE, D_COLOR2, D_COLOR1 } }    <br /><br />IF D_DIRECT = 1 // Horizontal<br />   GradientFill( hDC,  0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .T. )<br />ENDIF<br />IF D_DIRECT = 2 // Vertical<br />   GradientFill( hDC,  0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .F. )<br />ENDIF<br /><br />RETURN NIL<br /><br />// ----- Antonio's function with added lPos ( Gradient-Direction ) -------<br /><br />FUNCTION GradientBrush( oDlg, aColors, lPos )<br />local hDC, hBmp, hBmpOld, oBrush<br /><br />if Empty( oDlg:oBrush:hBitmap )<br />      hDC = CreateCompatibleDC( oDlg:GetDC() )<br />      hBmp = CreateCompatibleBitMap( oDlg:hDC, oDlg:nWidth, oDlg:nHeight )<br />      hBmpOld = SelectObject( hDC, hBmp )<br />      GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aColors, lPos )<br />      DeleteObject( oDlg:oBrush:hBrush )<br />      oDlg:oBrush:hBitmap = hBmp<br />      oDlg:oBrush:hBrush = CreatePatternBrush( hBmp ) <br />      SelectObject( hDC, hBmpOld )<br />      oDlg:ReleaseDC()<br />endif   <br /><br />RETURN NIL<br /> </span></div>[/code:35e315a3] There is still the same problem with Images to solve. [img:35e315a3]http&#58;//www&#46;pflegeplus&#46;com/pictures/btntools17&#46;jpg[/img:35e315a3] Using only Antonio's Function without < D_GRADIENT( hDC, oDlg ) > the controls are painted without Dlg-Background. [img:35e315a3]http&#58;//www&#46;pflegeplus&#46;com/pictures/btntools18&#46;jpg[/img:35e315a3] Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
BTNBMP problem
The following example is [b:387qfnrg]btntrans.prg[/b:387qfnrg] except that i reset the border with [b:387qfnrg]ResetBorder[/b:387qfnrg] .You will see it is not working. Can someone tells me why? Thanks A.S.K [code:387qfnrg] // Testing a transparent TBtnBmp on a transparent DialogBox #include "FiveWin&#46;ch" //----------------------------------------------------------------------------// function Main&#40;&#41; local oBru, oDlg, oBtn DEFINE BRUSH oBru FILENAME "&#46;&#46;/bitmaps/Backgrnd/beach&#46;bmp" DEFINE DIALOG oDlg SIZE 400, 200 BRUSH oBru TRANSPARENT @ 2, 2 SAY "Hello" OF oDlg oDlg&#58;aControls&#91; 1 &#93;&#58;lTransparent = &#46;t&#46; @ 70, 80 BTNBMP oBtn FILENAME "&#46;&#46;/bitmaps/yes&#46;bmp" ; SIZE 50, 30 OF oDlg ACTION MsgInfo&#40; "click" &#41; oBtn&#58;lTransparent = &#46;T&#46; oBtn&#58;ResetBorder&#40;&#41; ACTIVATE DIALOG oDlg CENTERED return nil //----------------------------------------------------------------------------//[/code:387qfnrg][/b]
BTNBMP problem
[quote="ask":m5zfrf0w] @ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ; SIZE 50, 30 OF oDlg ACTION MsgInfo( "click" )[/quote:m5zfrf0w] Try this:[code:m5zfrf0w] @ 70, 80 BTNBMP oBtn FILENAME "&#46;&#46;/bitmaps/yes&#46;bmp" ; SIZE 50, 30 OF oDlg ACTION MsgInfo&#40; "click" &#41; NOBORDER oBtn&#58;lTransparent = &#46;T[/code:m5zfrf0w] Regards Manuel Mercado
BTNBMP problem
[quote="mmercado":10iy98l3][quote="ask":10iy98l3] @ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ; SIZE 50, 30 OF oDlg ACTION MsgInfo( "click" )[/quote:10iy98l3] Try this:[code:10iy98l3] @ 70, 80 BTNBMP oBtn FILENAME "&#46;&#46;/bitmaps/yes&#46;bmp" ; SIZE 50, 30 OF oDlg ACTION MsgInfo&#40; "click" &#41; NOBORDER oBtn&#58;lTransparent = &#46;T[/code:10iy98l3] Regards Manuel Mercado[/quote:10iy98l3] Thank you for your reply but this is exactly what i don't want to do regards, A.S.K
BTNBMP slow performance
Hello Antonio or Rao , I have a reastaurant programm with touch interface. I use BTNBMP to drow the buttons. If the user wishes to charge , for example two coffe , the user presses the same butoon twice. If the user presses the same button to quickly , the programm will charge only one coffee. There is a waiting period before the same button can be pressed again . I have noted that if I use BUTTONS , this problem does not arise , but I don't want to lose the graphics and colours of BTNBMP <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> This is a sample , if you press quickly twice on the button 'Count' , the number increases by one [code=fw:2ak3wcks]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.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 />   <span style="color: #00C800;">local</span> oDlg ,oSay , n := <span style="color: #000000;">0</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">370</span>, <span style="color: #000000;">400</span><br />   <br />   <br />   @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> n  <span style="color: #0000ff;">COLOR</span> CLR_HRED  <span style="color: #0000ff;">OF</span> oDlg <br />   <br />   @ <span style="color: #000000;">11</span>, <span style="color: #000000;">138</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span> NOBORDER ;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" &Clear "</span> <span style="color: #0000ff;">LEFT</span> ;<br />       <span style="color: #0000ff;">ACTION</span> n := <span style="color: #000000;">0</span>  ,oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">100</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span> NOBORDER <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" COUNT"</span> ;<br />      <span style="color: #0000ff;">LEFT</span>   ;<br />      <span style="color: #0000ff;">ACTION</span> n++ ,oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <br /><br />  <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:2ak3wcks] Regards Maurizio <!-- m --><a class="postlink" href="http://www.nipeservice.com">http://www.nipeservice.com</a><!-- m -->
BTNBMP slow performance
+1 Yes. I also have the same problem, for a long time.
BTNBMP slow performance
Please, try with this In your sample [code=fw:7xslooo4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBtn2<br /><br />&nbsp; .../...<br /><br />   @ <span style="color: #000000;">100</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span> NOBORDER <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" COUNT"</span> ;<br />      <span style="color: #0000ff;">LEFT</span>   ;<br />      <span style="color: #0000ff;">ACTION</span> n++ ,oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBtn2:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || oBtn2:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /><br /> </div>[/code:7xslooo4] In an existing dialog or window [code=fw:7xslooo4]<div class="fw" id="{CB}" style="font-family: monospace;"><br />    AEVal<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | o | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBTNBMP"</span>, o:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || o:<span style="color: #0000ff;">Click</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> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:7xslooo4]
BTNBMP slow performance
Thanks Navarro this works [code=fw:t9w4j10k]<div class="fw" id="{CB}" style="font-family: monospace;"> @ <span style="color: #000000;">100</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span> NOBORDER <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" COUNT"</span> ;<br />      <span style="color: #0000ff;">LEFT</span>   ;<br />      <span style="color: #0000ff;">ACTION</span> n++ ,oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBtn2:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || oBtn2:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /> </div>[/code:t9w4j10k] Bat I have an array of BTNBMP and I this dosn't work [code=fw:t9w4j10k]<div class="fw" id="{CB}" style="font-family: monospace;">oBtn<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || oBtn<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:t9w4j10k] I try your code , but dosn't work [code=fw:t9w4j10k]<div class="fw" id="{CB}" style="font-family: monospace;">  AEVal<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | o | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBTNBMP"</span>, o:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || o:<span style="color: #0000ff;">Click</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> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:t9w4j10k] [code=fw:t9w4j10k]<div class="fw" id="{CB}" style="font-family: monospace;">Compiling...<br />Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1703231115<span style="color: #000000;">&#41;</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2016</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'sistem.prg'</span> and generating preprocessed output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'sistem.ppo'</span>...<br /><span style="color: #000000;">1</span> error<br /><br />No code generated.<br />sistem.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">31</span><span style="color: #000000;">&#41;</span> Error E0005 &nbsp;<span style="color: #0000ff;">Outer</span> codeblock variable <span style="color: #ff0000;">'O'</span> is out <span style="color: #0000ff;">of</span> reach<br />* Compile errors *</div>[/code:t9w4j10k] Maurizio
BTNBMP slow performance
[quote="Maurizio":fpzpa37l]Thanks Navarro this works [code=fw:fpzpa37l]<div class="fw" id="{CB}" style="font-family: monospace;"> @ <span style="color: #000000;">100</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BTNBMP</span> oBtn2 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span> NOBORDER <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" COUNT"</span> ;<br />      <span style="color: #0000ff;">LEFT</span>   ;<br />      <span style="color: #0000ff;">ACTION</span> n++ ,oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBtn2:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || oBtn2:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br /> </div>[/code:fpzpa37l] Bat I have an array of BTNBMP and I this dosn't work [code=fw:fpzpa37l]<div class="fw" id="{CB}" style="font-family: monospace;">oBtn<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || oBtn<span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:fpzpa37l] I try your code , but dosn't work [code=fw:fpzpa37l]<div class="fw" id="{CB}" style="font-family: monospace;">  AEVal<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | o | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBTNBMP"</span>, o:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || o:<span style="color: #0000ff;">Click</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> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:fpzpa37l] [code=fw:fpzpa37l]<div class="fw" id="{CB}" style="font-family: monospace;">Compiling...<br />Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1703231115<span style="color: #000000;">&#41;</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2016</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'sistem.prg'</span> and generating preprocessed output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'sistem.ppo'</span>...<br /><span style="color: #000000;">1</span> error<br /><br />No code generated.<br />sistem.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">31</span><span style="color: #000000;">&#41;</span> Error E0005  <span style="color: #0000ff;">Outer</span> codeblock variable <span style="color: #ff0000;">'O'</span> is out <span style="color: #0000ff;">of</span> reach<br />* Compile errors *</div>[/code:fpzpa37l] Maurizio[/quote:fpzpa37l] Yes, I wrote it quickly and I did not probe it, I just wanted to convey the idea Call this function at init clause of dialog or window container, or before ACTIVATE directly [code=fw:fpzpa37l]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> MyClick<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> o<br /><span style="color: #00C800;">local</span> x<br /><span style="color: #00C800;">For</span> x = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />    o   := oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> x <span style="color: #000000;">&#93;</span><br />    <span style="color: #00C800;">if</span> o:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBTNBMP"</span><br />       o:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || o:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">Next</span> x<br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:fpzpa37l]
BTNBMP slow performance
Out of interest... I have a touchscreen laying arround.... In order to try this kind of functions on a touchscreen, do I need to install extra FW software or simply install the screen ? The touch driver can be found on the internet and need to be installed.
BTNBMP slow performance
[quote="Marc Venken":3ija80sb]Out of interest... I have a touchscreen laying arround.... In order to try this kind of functions on a touchscreen, do I need to install extra FW software or simply install the screen ? The touch driver can be found on the internet and need to be installed.[/quote:3ija80sb] Do not need anything additional with Fw
BTNBMP slow performance
Hi Cristóbal... sorry for jumping in... [code=fw:ygsixsnz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">local</span> o<br />&nbsp; &nbsp;...<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEVal<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> |a,x| o := oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> x <span style="color: #000000;">&#93;</span>, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBTNBMP"</span>, o:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || o:<span style="color: #0000ff;">Click</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> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:ygsixsnz] Regards, Euclides
BTNBMP slow performance
Navarro same problem , with array of BTNBMP dosn't works Maurizio
BTNBMP slow performance
Maurizio, this work ok for me [code=fw:z377inek]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.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 ,oSay , n := <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aBtns &nbsp; := Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">370</span>, <span style="color: #000000;">400</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">VAR</span> n &nbsp;<span style="color: #0000ff;">COLOR</span> CLR_HRED &nbsp;<span style="color: #0000ff;">OF</span> oDlg <br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">11</span>, <span style="color: #000000;">138</span> <span style="color: #0000ff;">BTNBMP</span> aBtns<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span> NOBORDER ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" &Clear "</span> <span style="color: #0000ff;">LEFT</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> n := <span style="color: #000000;">0</span>, oSay:<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: #000000;">100</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">BTNBMP</span> aBtns<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span>, <span style="color: #000000;">18</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span> NOBORDER <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" COUNT"</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">LEFT</span> &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> n++ ,oSay:<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: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> MyClick<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 />&nbsp;<br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> MyClick<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> o<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> x<br />&nbsp; &nbsp;<span style="color: #00C800;">For</span> x = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;o &nbsp; := oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> x <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> o:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBTNBMP"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; o:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || o:<span style="color: #0000ff;">Click</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span> x<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:z377inek]
BTNBMP slow performance
With solution of Euclides [code=fw:2tgq9qtb]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">Function</span> MyClick<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> o<br />&nbsp; &nbsp;AEVal<span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | oBtt | o := oBtt, <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> oBtt:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TBTNBMP"</span>, oBtt:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span> || o:<span style="color: #0000ff;">Click</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> <span style="color: #000000;">&#125;</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 /> </div>[/code:2tgq9qtb]
BTNBMP slow performance
Thanks Navarro , I have to look why in your example it goes. Maurizio
BTNBMP tampoco me funciona
Buenas tardes, Sigo con problemas inexplicables en esta versión de FWPPC. Creo que mis librerías están incompletas o llenas de bugs. Algo tan simple como: @ 200, 5 BTNBMP oBtnSalir PROMPT "Salir" RESOURCE "PDAVOLVER" SIZE 230, 45 OF oWnd ACTION oWnd:end() No carga el bitmap, he seguido la traza y es que no carga el recurso bitmap. Aquí pasa algo y no puedo construir una simple aplicación con unos botones con bitmaps. Y lo confirmo, en mi librería el bInit de los diálogos tampoco funciona. Por favor, necesito unas librerías que funcionen, tengo que terminar esta pequeña aplicación.
BTNBMP tampoco me funciona
Joaquín, Acabo de enviarle un email a Toni Sales para que me envíe las librerías que ellos estan usando, para enviártelas.
BTNBMP text on 2 lines
Hi, Is there a possiblity to set the text of a BTNBMP on 2 lines? I already tested 'LINE1'+CRLF+'LINE2', but it doesn't work <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> . Thanks, Marc
BTNBMP text on 2 lines
Marc, You have to modify the Class TBtnBmp to paint more than one line. Is it placed on a buttonbar 2007 style ?
BTNBMP text on 2 lines
Antonio, It's not placed on a buttonbar 2007 style. The text should change depending of data from a database. Sometimes the text is longer then the width of th button. I can't enlarge the size of the button because there is no room anymore. The height of the button is large enough to have two lines. Regards, Marc
BTNBMP text on 2 lines
Marc, We email you a modified LIB. Please test it using CRLF in the text, thanks
BTNBMP text on 2 lines
Thanks Antonio, It's working very nice!!! Best regards, Marc
BTNBMP text on 2 lines
Hello Antonio Is this modify present in the new FW ? Regards MAurizio
BTNBMP text on 2 lines
Maurizio, It will be included in FWH 7.11. Anyhow, if you need it now, please email me and we will provide you the modified OBJs
BTNBMP text on 2 lines
Antonio Will you provide the same change for buttonbmp ? Richard
BTNBMP text on 2 lines
Richard, Its not that simple as we are calling the standard Windows Button paint procedure and if we override it, then we will not get the standard button painting <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> CallWindowProc( ::nOldProc, ::hWnd, WM_PAINT, ::hDC, 0 ) Maybe we find a way
BTNBMP transparent
Hi, i have some btnbmp on folder with xp style. Have anyone a solution to get Btnbmp transparent. i use FWH 7.01 and Harbour alpha build 1.0 Thanks in advance. Uwe
BTNBMP transparent
<!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=6632">http://fivetechsoft.com/forums/viewtopic.php?t=6632</a><!-- m -->
BTNBMP transparent
Antonio, your sample do not work. for example my sourcecode: The oBtn is not transparent now. DEFINE DIALOG oAuf:oDlgAuf RESOURCE "Aufmsk0" ICON oIauf REDEFINE FOLDER oAuf:oFauf ID 100 OF oAuf:oDlgauf ; ITEMS " Auftrags&kopf ", " Auftrags&positionen " ; DIALOGS "Aufmsk1", "Aufmsk2"; REDEFINE BTNBMP oBtn ID 123 noborder; RESOURCE "suchen1","","suchen11" OF ::oFauf:aDialogs[1] WHEN ::lNeu .AND. ! ::lNeuAppend ; ACTION (Msgstop()) [img:3vxvzbdx]http&#58;//www&#46;ziwu-soft&#46;de/img/image&#46;jpg[/img:3vxvzbdx] regards Uwe
BTNBMP transparent
Read again the code that Antonio refered you, detailed. Your code does not reflects the Antonio advice. Pay attention and read it again, I´m sure the answer is there. Regards, Carlos
BTNBMP transparent
You are missing this: DEFINE DIALOG oDlg ... [color=red:1w4zc8zx]TRANSPARENT [/color:1w4zc8zx] ... [color=red:1w4zc8zx]oBtn:lTransparent = .T. [/color:1w4zc8zx]
BTNBMP transparent
Hi, I have changed my code to the following, but it takes no effect. The BTNBMP are not transparent. Is the problem maybe in the resourceeditor,i use Visual c++ 6.0 or must i have a specially backround color for the bitmap that is in the resourceeditor? DEFINE DIALOG oDlgAuf RESOURCE "Aufmsk0" ICON oIauf TRANSPARENT REDEFINE FOLDER oFauf ID 100 OF oDlgauf ; ITEMS " Auftrags&kopf ", " Auftrags&positionen " ; DIALOGS "Aufmsk1", "Aufmsk2"; REDEFINE BTNBMP oBtn ID 156 noborder; RESOURCE "AKONTO1","","AKONTO11" OF ::oFauf:aDialogs[1] ; ACTION (Msgstop()); TOOLTIP "A-Kontobetrag" ; MESSAGE "A-Kontobetrag bearbeiten" oBtn:ltransparent = .T. Thanks in advance. Uwe
BTNBMP transparent
Please test this sample: [code:30cgmqvg] #include "FiveWin&#46;ch" function Main&#40;&#41; local oDlg, oBtn DEFINE DIALOG oDlg TRANSPARENT @ 10, 10 BTNBMP oBtn FILENAME "About&#46;bmp" NOBORDER oBtn&#58;lTransparent = &#46;T&#46; ACTIVATE DIALOG oDlg return nil [/code:30cgmqvg]
BTNBMP transparent
Antonio, your sample works fine,but my BTNBMP is not not on a dialog but also on a Folder. regards Uwe
BTNBMP transparent
Then try this: oFolder:aDialogs[ n ]:lTransparent = .T.
BTNBMP transparent
Antonio, sorry, but no effect. The Folder is in the Resourceeditor declared as SysTabControl32. The BTNBMP on the Dialog are OK. Do you have an other idea. regards, Uwe
BTNBMP transparent
Uwe, You may use a Class TButtonBmp object instead of a TBtnBmp one, as TButtonBmp uses the XP themes and will look better Please review samples\TestBuBm.prg
BTNBMP with windows style
Hello, looking around the fivewin code I found the wrapper for use of theme data of windows, I used it some time ago for a my project in C++. So I think it would be great if the btnbmp uses this procedures (and DrawFrameControl) to paint itself. Here an example of result: [img:1oae50nt]http&#58;//i&#46;imgur&#46;com/p6hqWab&#46;jpg[/img:1oae50nt] here an example of use: [code=fw:1oae50nt]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.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 />   <span style="color: #00C800;">local</span> oDlg, theme<br />   <br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">FROM</span>  <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"custom"</span> <span style="color: #0000ff;">PIXEL</span><br />   TThemed<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;">30</span>,<span style="color: #000000;">10</span>,oDlg<span style="color: #000000;">&#41;</span><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">110</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Button"</span> <span style="color: #0000ff;">PIXEL</span><br />   @ <span style="color: #000000;">30</span>,<span style="color: #000000;">110</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>,<span style="color: #000000;">64</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br />   @ <span style="color: #000000;">110</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"BTNBMP"</span> <span style="color: #0000ff;">PIXEL</span><br />   @ <span style="color: #000000;">130</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>,<span style="color: #000000;">64</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span><br />   @ <span style="color: #000000;">110</span>,<span style="color: #000000;">110</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"BTNBMP 2007"</span> <span style="color: #0000ff;">PIXEL</span><br />   @ <span style="color: #000000;">130</span>,<span style="color: #000000;">110</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>,<span style="color: #000000;">64</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #000000;">2007</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">CENTERED</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;">CLASS</span> TThemed <span style="color: #0000ff;">FROM</span> TControl<br />   <span style="color: #00C800;">DATA</span> theme<br />   <span style="color: #00C800;">DATA</span> lMOver AS LOGICAL<br />   <span style="color: #00C800;">DATA</span> lMDown AS LOGICAL<br />   CLASSDATA lRegistered AS LOGICAL<br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nRow, nCol, oWnd, nWidth, nHeight <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />   <span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">Destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Display</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">BeginPaint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">EndPaint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span><br /><br />   <span style="color: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><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><br />   <br />   <span style="color: #00C800;">METHOD</span> MouseLeave<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> MouseMove<span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> LButtonDown<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> LButtonUp<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span><br />   <br />   <span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <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> nRow, nCol, oWnd, nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TThemed<br />   <span style="color: #00C800;">DEFAULT</span> nRow := <span style="color: #000000;">10</span>, nCol := <span style="color: #000000;">10</span>, oWnd := GetWndDefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nWidth := <span style="color: #000000;">64</span>, nHeight := <span style="color: #000000;">64</span><br />   ::<span style="color: #000000;">oWnd</span>    = oWnd<br />   ::<span style="color: #000000;">nId</span>     = ::<span style="color: #000000;">GetNewId</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nStyle</span>  = nOR<span style="color: #000000;">&#40;</span> WS_CHILD, WS_VISIBLE, WS_TABSTOP <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">nTop</span>    = nRow<br />   ::<span style="color: #000000;">nLeft</span>   = nCol<br />   ::<span style="color: #000000;">nBottom</span> = ::<span style="color: #000000;">nTop</span> + nHeight - <span style="color: #000000;">1</span><br />   ::<span style="color: #000000;">nRight</span>  = ::<span style="color: #000000;">nLeft</span> + nWidth<br />   ::<span style="color: #000000;">lDrag</span>   = .F.                <br />   ::<span style="color: #000000;">lMOver</span>  = .F.<br />   ::<span style="color: #000000;">lMDown</span>  = .F.<br />   <br />   ::<span style="color: #000000;">theme</span>   = C5_OpenThemeData<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span>,<span style="color: #ff0000;">"BUTTON"</span><span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">Register</span><span style="color: #000000;">&#40;</span> nOR<span style="color: #000000;">&#40;</span> CS_VREDRAW, CS_HREDRAW <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">Create</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oWnd:<span style="color: #000000;">AddControl</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</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: #00C800;">METHOD</span> Destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TThemed<br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">theme</span>!=<span style="color: #000000;">0</span><br />      C5_CloseThemeData<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">theme</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><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: #00C800;">METHOD</span> MouseMove<span style="color: #000000;">&#40;</span> nRow, nCol, nKeyFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TThemed<br />   <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lMOver</span><br />      ::<span style="color: #000000;">lMOver</span> = .T.<br />      ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br />   TrackMouseEvent<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, <span style="color: #B900B9;">/*TME_LEAVE*/</span><span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">METHOD</span> MouseLeave<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TThemed<br />   ::<span style="color: #000000;">lMOver</span> = .F.<br />   ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">METHOD</span> LButtonDown<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TThemed<br />   ::<span style="color: #000000;">lMDown</span> = .T.<br />   ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #00C800;">METHOD</span> LButtonUp<span style="color: #000000;">&#40;</span> nRow, nCol <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TThemed<br />   ::<span style="color: #000000;">lMDown</span> = .F.<br />   ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">// DrawThemeBackground constants</span><br /><span style="color: #00D7D7;">#define</span> BP_PUSHBUTTON <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PBS_NORMAL <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> PBS_HOT <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> PBS_PRESSED <span style="color: #000000;">3</span><br /><span style="color: #B900B9;">// DrawFrameControl constants</span><br /><span style="color: #00D7D7;">#define</span> DFC_BUTTON <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> DFCS_HOT 0x1000<br /><span style="color: #00D7D7;">#define</span> DFCS_PUSHED 0x0200<br /><span style="color: #00D7D7;">#define</span> DFCS_BUTTONPUSH 0x0010<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> TThemed<br />   <span style="color: #00C800;">local</span> oBrush<br />   <span style="color: #B900B9;">//local aInfo := ::DispBegin()</span><br />   <span style="color: #00C800;">local</span> nState<br />   <span style="color: #B900B9;">//FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )</span><br />   ::<span style="color: #000000;">PaintBack</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hDC</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">if</span> ::<span style="color: #000000;">theme</span>!=<span style="color: #000000;">0</span><br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMOver</span><br />         <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMDown</span><br />            C5_DrawThemeBackground<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">theme</span>,::<span style="color: #000000;">hDC</span>, BP_PUSHBUTTON,PBS_PRESSED,GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">else</span><br />            C5_DrawThemeBackground<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">theme</span>,::<span style="color: #000000;">hDC</span>, BP_PUSHBUTTON,PBS_HOT,GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">else</span><br />         C5_DrawThemeBackground<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">theme</span>,::<span style="color: #000000;">hDC</span>, BP_PUSHBUTTON,PBS_NORMAL,GetClientRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">else</span><br />      nState := DFCS_BUTTONPUSH<br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMOver</span><br />         <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMDown</span><br />            nState := nOR<span style="color: #000000;">&#40;</span> nState, DFCS_PUSHED<span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">else</span><br />            nState := nOR<span style="color: #000000;">&#40;</span> nState, DFCS_HOT<span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">endif</span><br />      DrawFrameControl<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>, DFC_BUTTON, nState<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br />   <span style="color: #B900B9;">//::DispEnd( aInfo )</span><br /><span style="color: #00C800;">return</span><br /><br /><br /><span style="color: #00C800;">METHOD</span> HandleEvent<span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TThemed<br /><br />   <span style="color: #00C800;">if</span> nMsg == <span style="color: #000000;">794</span><span style="color: #B900B9;">//WM_THEMECHANGED</span><br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">theme</span>!=<span style="color: #000000;">0</span><br />         C5_CloseThemeData<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">theme</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />      ::<span style="color: #000000;">theme</span>   = C5_OpenThemeData<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">hWnd</span>,<span style="color: #ff0000;">"BUTTON"</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> nMsg == <span style="color: #000000;">675</span><span style="color: #B900B9;">//WM_MOUSELEAVE</span><br />      ::<span style="color: #000000;">MouseLeave</span><span style="color: #000000;">&#40;</span> nHiWord<span style="color: #000000;">&#40;</span> nLParam <span style="color: #000000;">&#41;</span>, nLoWord<span style="color: #000000;">&#40;</span> nLParam <span style="color: #000000;">&#41;</span>, nWParam <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #00C800;">Super</span>:<span style="color: #000000;">HandleEvent</span><span style="color: #000000;">&#40;</span> nMsg, nWParam, nLParam <span style="color: #000000;">&#41;</span></div>[/code:1oae50nt] anyone agree with me? Antonino Perricone
BTNBMP with windows style
Antonino, They look very nice, congratulations! a great work Do you think that you could include your code in Class TBtnBmp ? I appreciate if you review it yourself. If you don't have the most recent btnbmp.prg I will send it to you, many thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BTNBMP with windows style
I think it can be use d also to create CHECKBOX on xbrowse ( no use bitmaps instead) with the paramter [b:x9kthrcr]BP_CHECKBOX[/b:x9kthrcr] #define CBS_CHECKEDDISABLED 8 #define CBS_CHECKEDHOT 6 #define CBS_CHECKEDNORMAL 5 #define CBS_CHECKEDPRESSED 7 #define CBS_MIXEDDISABLED 12 #define CBS_MIXEDHOT 10 #define CBS_MIXEDNORMAL 9 #define CBS_MIXEDPRESSED 11 #define CBS_UNCHECKEDDISABLED 4 #define CBS_UNCHECKEDHOT 2 #define CBS_UNCHECKEDNORMAL 1 #define CBS_UNCHECKEDPRESSED 3 #define DFCS_BUTTONCHECK 0 #define DFCS_CHECKED 1024 #define DFCS_FLAT 16384 C5_DrawThemeBackground( hTheme, hDC, BP_CHECKBOX, if( n==0,CBS_UNCHECKEDNORMAL,CBS_CHECKEDNORMAL) , GetClientRect( ::hWnd ) ) thii is my cent...
BTNBMP with windows style
Antonino's enhancements have been included in FWH 15.05 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> * Enhancement TBTNBMP. Now btnbmp also can use the selected Desktop theme. Themes are applied only to btnbmps not defined with 2007 or 2010 or FlatStyles. Changing desktop theme when the application is running repaints the themed buttons using the current theme selected. Usage: Global Setting: TBtnBmp():lDefaultTheme := lOnOff // default .f. From the time this class data is set to true, all BtnBmp created (without 200? or flat style) are painted using the selected theme. Individual buttons can also be set as themed or not themed by setting oBtn:SetThemed( lOnOff ), overriding the global setting. Thanks to Mr Antonio Perricone. <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=22&t=30403">viewtopic.php?f=22&t=30403</a><!-- l --> Many thanks Antonino! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BTNBMP with windows style
[quote="Silvio.Falconi":266wcmng]I think it can be use d also to create CHECKBOX on xbrowse ( no use bitmaps instead) with the paramter [b:266wcmng]BP_CHECKBOX[/b:266wcmng] [/quote:266wcmng] Hi, for xBrowse the modification is very complex. Here a work-around: [code=fw:266wcmng]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <fivewin.ch><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oList, nSel, aBtm<br />   <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">FROM</span>  <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span><br />   aBtm := GetCheckBoxes<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">LISTBOX</span> oList <span style="color: #0000ff;">VAR</span> nSel MULTISEL <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span>;<br />      <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Item 1"</span>,<span style="color: #ff0000;">"Item 2"</span>,<span style="color: #ff0000;">"Item 3"</span>,<span style="color: #ff0000;">"Item 4"</span>,<span style="color: #ff0000;">"Item 5"</span>,<span style="color: #ff0000;">"Item 6"</span>,<span style="color: #ff0000;">"Item 7"</span>,<span style="color: #ff0000;">"Item 8"</span><span style="color: #000000;">&#125;</span>;<br />      <span style="color: #0000ff;">BITMAPS</span> aBtm ;<br />        <span style="color: #0000ff;">ON</span> DRAWITEM <span style="color: #000000;">&#40;</span> IIF<span style="color: #000000;">&#40;</span>aScan<span style="color: #000000;">&#40;</span>oList:<span style="color: #000000;">GetSelItems</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,nItem<span style="color: #000000;">&#41;</span>><span style="color: #000000;">0</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#define</span> DFC_BUTTON <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> DFCS_BUTTONCHECK        0x0000<br /><span style="color: #00D7D7;">#define</span> DFCS_CHECKED            0x0400<br /><span style="color: #00D7D7;">#define</span> BP_CHECKBOX <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> CBS_UNCHECKEDNORMAL <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> CBS_CHECKEDNORMAL <span style="color: #000000;">5</span><br /><br /><span style="color: #00C800;">function</span> GetCheckBoxes<span style="color: #000000;">&#40;</span>oWnd<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> hDCMem, hBmpMem := <span style="color: #000000;">&#123;</span><span style="color: #00C800;">Nil</span>,<span style="color: #00C800;">Nil</span><span style="color: #000000;">&#125;</span>,i, tmp<br />   <span style="color: #00C800;">LOCAL</span> FCStates := <span style="color: #000000;">&#123;</span>DFCS_BUTTONCHECK,nOr<span style="color: #000000;">&#40;</span>DFCS_BUTTONCHECK,DFCS_CHECKED<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">LOCAL</span> TMStates := <span style="color: #000000;">&#123;</span>CBS_UNCHECKEDNORMAL,CBS_CHECKEDNORMAL<span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">LOCAL</span> oTheme := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">if</span> IsAppThemed<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oTheme   = C5_OpenThemeData<span style="color: #000000;">&#40;</span>oWnd:<span style="color: #000000;">hWnd</span>,<span style="color: #ff0000;">"BUTTON"</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br />      <br />   <span style="color: #00C800;">for</span> i:=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">2</span> <br />      hDCMem := CreateCompatibleDC<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      hBmpMem<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> := CreateCompatibleBitmap<span style="color: #000000;">&#40;</span> oWnd:<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">16</span> <span style="color: #000000;">&#41;</span><br />      tmp := SelectObject<span style="color: #000000;">&#40;</span> hDCMem, hBmpMem<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />      <br />      FillRect<span style="color: #000000;">&#40;</span> hDCMem,<span style="color: #000000;">&#123;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">16</span>,<span style="color: #000000;">16</span><span style="color: #000000;">&#125;</span>, GetStockObject<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> oTheme != <span style="color: #000000;">0</span><br />         C5_DrawThemeBackground<span style="color: #000000;">&#40;</span>oTheme, hDCMem, BP_CHECKBOX,TMStates<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">15</span>,<span style="color: #000000;">15</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">else</span><br />         DrawFrameControl<span style="color: #000000;">&#40;</span>hDCMem,<span style="color: #000000;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">15</span>,<span style="color: #000000;">15</span><span style="color: #000000;">&#125;</span>, DFC_BUTTON,FCStates<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />      SelectObject<span style="color: #000000;">&#40;</span> hDCMem, tmp <span style="color: #000000;">&#41;</span><br />      DeleteDC<span style="color: #000000;">&#40;</span> hDCMem <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br />   <br />   <span style="color: #00C800;">if</span> oTheme!=<span style="color: #000000;">0</span><br />      C5_CloseThemeData<span style="color: #000000;">&#40;</span>oTheme<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br />   <br /><span style="color: #00C800;">return</span> hBmpMem</div>[/code:266wcmng] It consists to create the bitmaps using C5_DrawThemeBackground and DrawFrameControl. Here a screen shot [img:266wcmng]http&#58;//i&#46;imgur&#46;com/PMoKUhT&#46;jpg[/img:266wcmng] regards, Antonino
BTNBMP with windows style
yes I thinked it could be made.... you're a big
BTNBMP with windows style
Antonino, to move an item -> change the position Up and Down [code=fw:2lzn3f02]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> SwapUpArray<span style="color: #000000;">&#40;</span> aArray, nPos <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> uTmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nPos &nbsp; := len<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nPos <= len<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span> .and. nPos > <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; uTmp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= aArray<span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; aArray<span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp;:= aArray<span style="color: #000000;">&#91;</span>nPos - <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; aArray<span style="color: #000000;">&#91;</span>nPos - <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := uTmp<br />&nbsp; &nbsp;end <span style="color: #00C800;">if</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;">function</span> SwapDwArray<span style="color: #000000;">&#40;</span> aArray, nPos <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> uTmp<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nPos &nbsp; := len<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nPos < len<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span> .and. nPos > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; uTmp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= aArray<span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; aArray<span style="color: #000000;">&#91;</span>nPos<span style="color: #000000;">&#93;</span> &nbsp; &nbsp; &nbsp;:= aArray<span style="color: #000000;">&#91;</span>nPos + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; aArray<span style="color: #000000;">&#91;</span>nPos + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := uTmp<br />&nbsp; &nbsp;end <span style="color: #00C800;">if</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2lzn3f02]
BTNBMP é possível ajustar uma imagem dentro do botão?
Antonio é possível ajustar uma imagem dentro do botão (BTNBMP)? Grato Aoki
BTNBMP é possível ajustar uma imagem dentro do botão?
TENTE COM O COMANDO: ADJUST.
BTNBMP é possível ajustar uma imagem dentro do botão?
Não funciona!
BTNBMP é possível ajustar uma imagem dentro do botão?
Aoki, Modifica el código fuente de la clase TBtnBmp método Paint
BTNBMP é possível ajustar uma imagem dentro do botão?
Desulpe-me Antonio, mais não tenho experiência para fazer tal alteração, usted poderia indicar a alteração necessaria? Grato Aoki
BTNBMP é possível ajustar uma imagem dentro do botão?
Antonio como modificar o metodo paint? Grato Aoki
BTNBMP image moved up
Dear friends, as subject on Vista & XP with FWH 8.11. Is possible to solve?
BTNBMP image moved up
to more explain: [img:2pr6my93]http&#58;//www&#46;garombo&#46;eu/public/support/image/image1&#46;jpg[/img:2pr6my93] [img:2pr6my93]http&#58;//www&#46;garombo&#46;eu/public/support/image/image2&#46;jpg[/img:2pr6my93]
BTNBMP image moved up
For the solution add [b:sahj4w6l]CENTER[/b:sahj4w6l] please see: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=14119&p=72747&hilit=oleuninitialize#p72698">viewtopic.php?f=6&t=14119&p=72747&hilit=oleuninitialize#p72698</a><!-- l --> [code=fw:sahj4w6l]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> BTNBMP oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">120</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">CENTER</span> ;<br /><span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"B16_PAGEUP"</span> NOBORDER;<br />TOOLTIP <span style="color: #ff0000;">"Page Up"</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">PageUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>[/code:sahj4w6l] Many thanks to George.
BTNBMP image moved up
Ugo, That bug was solved in 9.01 and it was discussed in these forums.
BTNBMP image moved up
[quote="Antonio Linares":1pwl76ur]That bug was solved in 9.01 and it was discussed in these forums.[/quote:1pwl76ur] Dear Antonio, i don't found when i searched it! <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> I have got another bug with tbtnget and the right image: [img:1pwl76ur]http&#58;//www&#46;garombo&#46;eu/public/support/image/image3&#46;jpg[/img:1pwl76ur] Is solved this?
BTNBMP image moved up
Ugo, FWH supports this syntax now: @ ..., .. GET ... ACTION ... BITMAP ... There is no need to keep using TBtnGet.
BTNBMP image moved up
Ugo, Please build FWH\samples\Test4.prg. Here it looks fine (using 9.02): [img:3gs5n9fj]http&#58;//img23&#46;imageshack&#46;us/img23/2835/capturer&#46;png[/img:3gs5n9fj]
BTNBMP image moved up
Antonio, very beautifull!
BTNBMP image moved up
[quote="Antonio Linares":11p1e7mg]FWH supports this syntax now: @ ..., .. GET ... ACTION ... BITMAP ... There is no need to keep using TBtnGet.[/quote:11p1e7mg] Antonio, Is supported on FWH 8.11? or in 8.11 there is a workaround?
BTNBMP image moved up
Ugo, Yes, it is available in 8.11 <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Please review FWH\samples\GetBtn.prg
BTNBMP image moved up
Wow, thank you.
BTNGET Y FWH 6.12
Nunca faltan sufrimientos a la hora de actualizar FWH cuando se usan clases externas al mismo (no digo que sea culpa de FWH). Tal vez alguien me pueda ayudar en este problema con la Clase BtnGet. Esta clase me ha funcionado perfecto con FWH Marzo 2006 (2.7), al actualizarme a la version 6.12, la funcion FWCalendar (que muestra un calendario muy práctico, no muestra los numeros de las fechas. ¿alguien me puede ayudar? Pueden hallar esta clase con un ejemplo que muestra el error en: <!-- m --><a class="postlink" href="http://hyperupload.com/download/02200d8b54/BtnGet32.exe.html">http://hyperupload.com/download/02200d8 ... 2.exe.html</a><!-- m --> Desde ya muchas gracias por cualquier ayuda que puedo recibir, ya que no puedo usar la actualización hasta resolver este problema ya que tengo objetos de esta clase por todas mis aplicaciones.
BTNGET Y FWH 6.12
José, Hay que hacer una pequeña modificación en la clase TSay, en concreto hay que quitar la línea 265 (::VarPut(...)). Con ese cambio debería funcionarte correctamente.
BTNGET Y FWH 6.12
Ó PUEDES USAR ESTE CALENDÁRIO: <!-- m --><a class="postlink" href="http://www.fivewin.com.br/exibedicas.asp?id=594">http://www.fivewin.com.br/exibedicas.asp?id=594</a><!-- m -->
BTNGET Y FWH 6.12
Gracias a ambos por responderme tan pronto!!!!!!!! Antonio, efectivamente era ese el problema, ahora me funciona perfecto <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Karinha, Si bien no puedo usar tu calendario para esta clase porque es demasiado grande, seguramente me resultará útil para otras cosas, está muy bello. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
BTNGET as COMBO
I am trying to insert a button in a get that looks like the combobox button so that it is homogeneous graphically but big problems, so far I have reached this result, is it possible in your opinion to do better? I can't use two comboboxes I have to use two tget controls with a button to call a function that shows a list of numbers [img:u20s0mc7]https&#58;//i&#46;postimg&#46;cc/jdsDhMhc/sdsssss&#46;png[/img:u20s0mc7] I saw we can modiy the style of button on this page <!-- m --><a class="postlink" href="https://docs.microsoft.com/en-us/windows/win32/controls/button-styles">https://docs.microsoft.com/en-us/window ... ton-styles</a><!-- m --> for a sample modifying to BS_SPLITBUTTON (reates a split button. A split button has a drop down arrow.) but I not found the value I think we can get to have the same style of the combobox, what do you think about?
BTNGET vs GET..ACTION..BITMAP
Dear Ugo, I think Antonio will include RESIZE16 clause fixed for GET..ACTION. If not now you can fix as following. I've changed all BTNGET to original GET..ACTION and working without problem [code=fw:rc5h0vyn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> CreateButton<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TGet<br />   <span style="color: #00C800;">local</span> oThis := <span style="color: #00C800;">Self</span><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bAction</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span> .and. Upper<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TGET"</span> <br />      <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBmpName</span> <span style="color: #000000;">&#41;</span><br />         @ <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nWidth</span> - ::<span style="color: #000000;">nHeight</span> BUTTONBMP ::<span style="color: #000000;">oBtn</span> <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span> ;<br />         <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> oThis:<span style="color: #000000;">bAction</span>, oThis <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;   <span style="color: #B900B9;">// , oThis:LostFocus() ) ;  </span><br />         <span style="color: #0000ff;">SIZE</span> ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">4</span>, ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">4</span> <span style="color: #0000ff;">PIXEL</span><br />         <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span><br />            ::<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"..."</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span>      <br />      <span style="color: #00C800;">else</span>   <br />         @ <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nWidth</span> - ::<span style="color: #000000;">nHeight</span> BUTTONBMP ::<span style="color: #000000;">oBtn</span> <span style="color: #0000ff;">OF</span> <span style="color: #00C800;">Self</span> ; <br />         <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> oThis:<span style="color: #000000;">bAction</span>, oThis <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;  <span style="color: #B900B9;">//  oThis:SetFocus() ) ;</span><br />         <span style="color: #0000ff;">SIZE</span> ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">4</span>, ::<span style="color: #000000;">nHeight</span> - <span style="color: #000000;">4</span> <span style="color: #0000ff;">PIXEL</span> BITMAP ::<span style="color: #000000;">cBmpName</span><br />      <span style="color: #00C800;">endif</span><br /><span style="color: #B900B9;">//  add this 3 lines.</span><br />      <span style="color: #00C800;">if</span> Upper<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"TDIALOG"</span> .and. ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">lResize16</span><br />         ::<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">nLeft</span>   = <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span> * <span style="color: #000000;">1.167</span> <span style="color: #000000;">&#41;</span> - ::<span style="color: #000000;">nHeight</span><br />      end<br /><span style="color: #B900B9;">// add above 3 lines</span><br />      ::<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">lCancel</span> = .T. <span style="color: #B900B9;">// so the GET VALID is not fired when the button is focused</span><br /><br />      <span style="color: #B900B9;">/*<br />      // We force a WM_NCCALCSIZE msg to be sent to the GET      <br />      SetWindowPos( ::hWnd, 0, 0, 0, 0, 0,;<br />                    nOr( SWP_NOMOVE, SWP_NOSIZE, SWP_NOZORDER, SWP_FRAMECHANGED ) )<br />      */</span>              <br />   <span style="color: #00C800;">endif</span>   <br />   <br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span>   <br /> </div>[/code:rc5h0vyn]
BTNGET vs GET..ACTION..BITMAP
[quote="Antonio Linares":2kcf2xg7]FWH supports this syntax now: @ ..., .. GET ... ACTION ... BITMAP ... There is no need to keep using TBtnGet.[/quote:2kcf2xg7] Dear Antonio, I use the redefine, work, but not well, the button position is not on the right! [img:2kcf2xg7]http&#58;//www&#46;garombo&#46;eu/public/support/image/image5&#46;jpg[/img:2kcf2xg7] and next, how to support RESOURCE clause? In the image the second is btnget <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> Many thanks for your reponse.
BTNGET vs GET..ACTION..BITMAP
[quote="Enrico Maria Giordano":26ap9kv5][quote="Ugo":26ap9kv5]There is also the RESOURCE How to use the resource instead bitmap image?[/quote:26ap9kv5] It is not supported yet. You have to modify CreateButton() method for this. Antonio?[/quote:26ap9kv5] Antonio, can you help me?
BTNGET vs GET..ACTION..BITMAP
[quote="Ugo":3swywan1]Dear Enrico, Test it:[/quote:3swywan1] Interesting... It seems I was wrong. If I change the last line of @ row, col GET ... ACTION command in fivewin.ch: [code=fw:3swywan1]<div class="fw" id="{CB}" style="font-family: monospace;"><.pass.>, <span style="color: #000000;">&#91;</span><.lNoBorder.><span style="color: #000000;">&#93;</span>, <nHelpId>,,,,,, <<span style="color: #000000;">&#123;</span>uAction<span style="color: #000000;">&#125;</span>>, <cBmpName>, <<span style="color: #ff0000;">"uVar"</span>> <span style="color: #000000;">&#41;</span></div>[/code:3swywan1] then it works fine. Antonio? EMG
BTNGET vs GET..ACTION..BITMAP
Dear Dutch, the position work well, thank you. > I've changed all BTNGET to original GET..ACTION and working without problem I have a problem, test this (with BTNGET work well): [code=fw:j2zpjvan]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">LOCAL</span> o := MyClass<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 /><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #00C800;">CLASS</span> MyClass<br />   <span style="color: #00C800;">DATA</span> dData<br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />   <span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyClass<br /><br />   <span style="color: #00C800;">LOCAL</span> oGet4, lWhen := .T., oDlg<br /><br />   ::<span style="color: #000000;">dData</span> := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br />   @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet4 <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">dData</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@D"</span>;  <span style="color: #B900B9;">// RESOURCE "B_Cld"</span><br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">12</span> ;<br />            <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">dData</span>:=Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-10</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />   <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span></div>[/code:j2zpjvan] return an error when i click button. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> This is the error: [quote:j2zpjvan] Descrizione: Warning BASE/1005 Message not found: TGET:_DDATA Args: Stack Calls =========== Called from: source\rtl\tobject.prg => TGET:ERROR(172) Called from: source\rtl\tobject.prg => TGET:MSGNOTFOUND(205) Called from: source\rtl\tobject.prg => TGET:_DDATA(0) Called from: SRC-WIN\TEst\Source\Test.prg => (b)MYCLASS:NEW(82) Called from: prg\TGET.prg => (b)TGET:CREATEBUTTON(465) Called from: prg\BUTTON.prg => TBUTTONBMP:CLICK(177) Called from: prg\CONTROL.prg => TBUTTON:HANDLEEVENT(1412) Called from: prg\BUTTONB.prg => TBUTTONBMP:HANDLEEVENT(168) Called from: prg\WINDOW.prg => _FWH(3345) Called from: => SENDMESSAGE(0) Called from: prg\WINDOW.prg => TGET:COMMAND(1014) Called from: => TWINDOW:HANDLEEVENT(0) Called from: prg\CONTROL.prg => TCONTROL:HANDLEEVENT(1454) Called from: prg\TGET.prg => TGET:HANDLEEVENT(561) Called from: prg\WINDOW.prg => _FWH(3345) Called from: => DIALOGBOXINDIRECT(0) Called from: prg\DIALOG.prg => TDIALOG:ACTIVATE(273) Called from: SRC-WIN\TEst\Source\Test.prg => MYCLASS:NEW(84) Called from: SRC-WIN\TEst\Source\Test.prg => MAIN(60) [/quote:j2zpjvan] There is a workaround? Is possible to insert also the resources? Many thanks in advance.
BTNGET vs GET..ACTION..BITMAP
[code=fw:21u672m4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><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> o := MyClass<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 /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #00C800;">CLASS</span> MyClass<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> dData<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyClass<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oGet4, lWhen := .T., oDlg, oSelf := <span style="color: #00C800;">Self</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">dData</span> := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet4 <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">dData</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@D"</span>; &nbsp;<span style="color: #B900B9;">// RESOURCE "B_Cld"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">12</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oSelf:<span style="color: #000000;">dData</span>:=Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-10</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span></div>[/code:21u672m4] EMG
BTNGET vs GET..ACTION..BITMAP
Dear Enrico, work well, of course! <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> thank you. This is a bug? The other clauses (valid,spinner,when etc.) work well using directly the class variable. There is also the RESOURCE How to use the resource instead bitmap image?
BTNGET vs GET..ACTION..BITMAP
[quote="Ugo":2thygy85]This is a bug?[/quote:2thygy85] It seems not. Look inside tget.prg, method CreateButton() and you will see that the same technique is used there. I tried it under Harbour with the same result (the local variable is still required). [quote="Ugo":2thygy85]There is also the RESOURCE How to use the resource instead bitmap image?[/quote:2thygy85] It is not supported yet. You have to modify CreateButton() method for this. Antonio? EMG
BTNGET vs GET..ACTION..BITMAP
[quote="Enrico Maria Giordano":119ups2s][quote="Ugo":119ups2s]This is a bug?[/quote:119ups2s] It seems not. Look inside tget.prg, method CreateButton() and you will see that the same technique is used there. I tried it under Harbour with the same result (the local variable is still required). [quote="Ugo":119ups2s]The other clauses (valid,spinner,when etc.) work well using directly the class variable[/quote:119ups2s][/quote:119ups2s] Dear Enrico, Test it: [code=fw:119ups2s]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> o<br /><br />   Set century <span style="color: #0000ff;">on</span><br />   SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">2000</span><br /><br />   o := MyClass<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 /><br />   <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #00C800;">CLASS</span> MyClass<br />   <span style="color: #00C800;">DATA</span> dData<br />   <span style="color: #00C800;">DATA</span> lTest <span style="color: #0000ff;">INIT</span> .T.<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />   <span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyClass<br /><br />   <span style="color: #00C800;">LOCAL</span> oGet4, lWhen := .T., oDlg, oSelf := <span style="color: #00C800;">Self</span>, cTxt := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, oGet5<br /><br />   ::<span style="color: #000000;">dData</span> := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br />   @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet4 <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">dData</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@D"</span>;  <span style="color: #B900B9;">// RESOURCE "B_Cld"</span><br />            <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">12</span> ;<br />            <span style="color: #0000ff;">WHEN</span> ::<span style="color: #000000;">lTest</span>;<br />            <span style="color: #0000ff;">VALID</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lTest</span>,;<br />                      <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> MyTest<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">dData</span> <span style="color: #000000;">&#41;</span>,;<br />                        <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Test OK"</span>, ::<span style="color: #000000;">dData</span> <span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span>,;<br />                        <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Test KO"</span>, ::<span style="color: #000000;">dData</span> <span style="color: #000000;">&#41;</span>, .F. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,;<br />                        .T. <span style="color: #000000;">&#41;</span>;<br />            <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oSelf:<span style="color: #000000;">dData</span>:=Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-10</span><span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> oGet5 <span style="color: #0000ff;">VAR</span> cTxt <span style="color: #0000ff;">OF</span> oDlg<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />   <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> MyTest<span style="color: #000000;">&#40;</span> dData <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Test in corso"</span> + CRLF + ;<br />            DToS<span style="color: #000000;">&#40;</span> dData <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" < "</span> + DToS<span style="color: #000000;">&#40;</span> Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />            cValToChar<span style="color: #000000;">&#40;</span> dData < Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> , dData <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">RETURN</span> dData < Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:119ups2s] as you can see, both the variable ::lTest that the same ::dData work well in the When and Valid clauses, only Action required oSelf.
BTNGET y la enie mayúscula
Estimados, Miren este código: [code:3lx9kfot]REDEFINE BTNGET oDatos&#91; 01 &#93; VAR vDatos&#91; 01 &#93;; PICTURE "@!"; ID 118 OF oDlg[/code:3lx9kfot] Ovbiedo ( yo ) dice que cuando corre su app, y quiere escribir la Ñ aparece ñ, y eso que esta todo en mayúsculas. Porque ocurre esto?
BTNTRNS can use with WINDOW?
Dear All, I try BTNTRNS, it works fine for DIALOG but it doesn't "Translucent background" on WINDOW. Can it use with WINDOW? Thanks in advance, Dutch
BTNTRNS can use with WINDOW?
Dear Dutch, Please post a small PRG to test, thanks
BTNTRNS can use with WINDOW?
Dear Antonio, I got the problem now. The TRANSLUCENT BUTTONS will work with background image from BRUSH. But it doesn't work with background image from FW_Drawimage(). [quote="Antonio Linares":3t44hvy8]Dear Dutch, Please post a small PRG to test, thanks[/quote:3t44hvy8]
BTNTRNS can use with WINDOW?
Please post a small PRG to test <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
BTNTRNS can use with WINDOW?
Dear Antonio, This is sample my code. ".\TESTSBTN.JPG' just jpg file for background. [code=fw:3iks5lzd]<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;">'TSbutton.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'Image.ch'</span><br /><br /><span style="color: #00C800;">Static</span> oWnd, nWndWidth, nWndHeight, oFont40<br /><br />*------------------------------*<br /><span style="color: #00C800;">Function</span> Main<br /><span style="color: #00C800;">local</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">local</span> aImage1 <br /><br />nWndWidth   := GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />nWndHeight  := GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont40 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">'Tahoma'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-40</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'Test Button on Image Background'</span> ;<br />         <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> WS_POPUP, WS_VISIBLE <span style="color: #000000;">&#41;</span> ;<br />     <span style="color: #0000ff;">COLOR</span> CLR_WHITE, CLR_HGRAY<br /><br />    aImage1 := Fw_ReadImage<span style="color: #000000;">&#40;</span> oWnd, <span style="color: #ff0000;">'.<span style="color: #000000;">\t</span>estsbtn.jpg'</span> <span style="color: #000000;">&#41;</span><br /><br />    @ <span style="color: #000000;">200</span>, <span style="color: #000000;">400</span> SBUTTON oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Check-Out'</span> <span style="color: #0000ff;">OF</span> oWnd ;<br />                    <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>,<span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> ;            <br />                    FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\a</span>ndroid.bmp"</span> ;<br />                    <span style="color: #0000ff;">FONT</span> oFont40 ; <br />                    NOBOXTR ;<br />                    <span style="color: #0000ff;">TEXT</span> ON_BOTTOM ; <span style="color: #B900B9;">// COLORS CLR_BLACK, CLR_GRAY ;</span><br />                    COLORS CLR_WHITE ;<br />                    <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ok1'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />    @  <span style="color: #000000;">200</span>,<span style="color: #000000;">1000</span> SBUTTON oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Check-In'</span> <span style="color: #0000ff;">OF</span> oWnd ;<br />                    <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>,<span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> ;            <br />                    FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\d</span>esign.bmp"</span> ;<br />                    <span style="color: #0000ff;">FONT</span> oFont40 ;                      <br />                    NOBOXTR ;<br />                    <span style="color: #0000ff;">TEXT</span> ON_BOTTOM ; <br />                    COLORS CLR_WHITE ;<br />                    <span style="color: #0000ff;">ACTION</span> CheckIn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                    <br />   @ <span style="color: #000000;">700</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Translucent"</span> + CRLF + <span style="color: #ff0000;">"Buttons "</span> <span style="color: #0000ff;">OF</span> oWnd ;<br />                 FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\i</span>chat.bmp"</span> ;<br />                 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span> NOBORDER FLAT ;<br />                 <span style="color: #0000ff;">FONT</span> oFont40 <span style="color: #0000ff;">COLOR</span> CLR_WHITE,CLR_BLACK<br /><br />                 oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> |lInvert| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lInvert, 0x60FFA54A, nARGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />                    <br />                    <br />    @  <span style="color: #000000;">700</span>,<span style="color: #000000;">1000</span> SBUTTON oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Exit'</span> <span style="color: #0000ff;">OF</span> oWnd ;<br />                    <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> ;            <br />                    <span style="color: #0000ff;">FONT</span> oFont40 ;                      <br />                    LOOK W97 ;              <br />                    ROUNDRECT ;<br />                    <span style="color: #0000ff;">TEXT</span> ON_BOTTOM ; <br />                    COLORS CLR_WHITE ;<br />                    <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br />            <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> Fw_DrawImage<span style="color: #000000;">&#40;</span> oWnd, aImage1, <span style="color: #000000;">&#123;</span><span style="color: #000000;">120</span>, <span style="color: #000000;">0</span>, nWndHeight<span style="color: #000000;">-100</span>, nWndWidth <span style="color: #000000;">&#125;</span>, <span style="color: #00C800;">nil</span>, .T., <span style="color: #000000;">40</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont40<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />*-----------------*<br /><span style="color: #00C800;">Function</span> CheckIn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oFnt, oDlg, oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, oSay, oBmp, oDlgCLose, oImg, aImage1, oBrush<br /><br /><br />            <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWndWidth, nWndHeight ; <br />                     <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> WS_CHILD, WS_POPUP <span style="color: #000000;">&#41;</span> ;<br />                   <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE ;  <br />                   TRANSPARENT<br /><br />                oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />                                 <br />            <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span>  <span style="color: #000000;">&#40;</span>ShowImg<span style="color: #000000;">&#40;</span> oDlg, oBtn <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">nOpacity</span> := <span style="color: #000000;">180</span><span style="color: #000000;">&#41;</span> <br />            <br />                                 <br /><span style="color: #00C800;">return</span> .T. <br /><br />*-------------------------------------*<br /><span style="color: #00C800;">Function</span> ShowImg<span style="color: #000000;">&#40;</span> oDlg, oBtn <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oImg<br /><span style="color: #00C800;">local</span> cImage := <span style="color: #ff0000;">'.<span style="color: #000000;">\T</span>ESTSBTN.JPG'</span><br /><br /><br />    @  <span style="color: #000000;">120</span>, <span style="color: #000000;">0</span> XIMAGE oImg SOURCE cImage NOBORDER <span style="color: #0000ff;">SIZE</span> nWndWidth, nWndHeight<span style="color: #000000;">-220</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span><br />                  <br />                  oImg:<span style="color: #000000;">FitWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                  oImg:<span style="color: #000000;">FitHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                  oImg:<span style="color: #000000;">lBmpTransparent</span> := .T.<br /><br />        @   <span style="color: #000000;">200</span>, <span style="color: #000000;">400</span> SBUTTON oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Walk-In'</span>  <span style="color: #0000ff;">OF</span> oImg ;<br />                        <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>, <span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> ; <br />                        <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"WALKIN"</span> ;<br />                        <span style="color: #0000ff;">FONT</span> oFont40 ;<br />                        LOOK W97 ;<br />                        <span style="color: #0000ff;">TEXT</span> POSITION ON_BOTTOM ;<br />                        <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ok'</span><span style="color: #000000;">&#41;</span><br />                        <br />        @  <span style="color: #000000;">200</span>,<span style="color: #000000;">1000</span> SBUTTON oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Booking'</span> <span style="color: #0000ff;">OF</span> oImg ;<br />                        <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>, <span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> ; <br />                        <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"BOOKING"</span> ;<br />                        <span style="color: #0000ff;">FONT</span> oFont40 ;<br />                        LOOK W97 ;<br />                        <span style="color: #0000ff;">TEXT</span> POSITION ON_BOTTOM ;<br />                        <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'ok'</span><span style="color: #000000;">&#41;</span><br />                                <br />        @  <span style="color: #000000;">700</span>,<span style="color: #000000;">1000</span> SBUTTON oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Back'</span> <span style="color: #0000ff;">OF</span> oImg ;<br />                        <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">150</span> <span style="color: #0000ff;">PIXEL</span> ;            <br />                        <span style="color: #0000ff;">FONT</span> oFont40 ;                      <br />                        LOOK W97 ;              <br />                        ROUNDRECT ;<br />                        <span style="color: #0000ff;">TEXT</span> ON_BOTTOM ; <br />                        COLORS CLR_BLACK ;<br />                        <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 />       @ <span style="color: #000000;">700</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" Translucent"</span> + CRLF + <span style="color: #ff0000;">"Buttons "</span> <span style="color: #0000ff;">OF</span> oImg ;<br />                     FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\i</span>chat.bmp"</span> ;<br />                     <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span> NOBORDER FLAT ;<br />                     <span style="color: #0000ff;">FONT</span> oFont40 <span style="color: #0000ff;">COLOR</span> CLR_WHITE,CLR_BLACK<br />    <br />                     oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">&#123;</span> |lInvert| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lInvert, 0x60FFA54A, nARGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">0</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> .T.</div>[/code:3iks5lzd] [quote="Antonio Linares":3iks5lzd]Please post a small PRG to test <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:3iks5lzd] [url:3iks5lzd]https&#58;//i&#46;postimg&#46;cc/QMzx3BvM/TESTSBTN&#46;jpg[/url:3iks5lzd] [url=https&#58;//postimages&#46;org/:3iks5lzd][img:3iks5lzd]https&#58;//i&#46;postimg&#46;cc/QMzx3BvM/TESTSBTN&#46;jpg[/img:3iks5lzd][/url:3iks5lzd]
BTNTRNS can use with WINDOW?
Dutch, see if I understand what you want to do. Dutch, a ver si entiendo lo que quieres hacer. [url:1071fyod]https&#58;//imgur&#46;com/sNg5eE7[/url:1071fyod] [img:1071fyod]https&#58;//i&#46;imgur&#46;com/sNg5eE7&#46;png[/img:1071fyod] Regards, saludos.
BTNTRNS can use with WINDOW?
Dear Karinha, Yes, thank you. I got it by using SBUTTON with Alpha Channel image. [quote="karinha":2j7oqoyl]Dutch, see if I understand what you want to do. Dutch, a ver si entiendo lo que quieres hacer. [url:2j7oqoyl]https&#58;//imgur&#46;com/sNg5eE7[/url:2j7oqoyl] [img:2j7oqoyl]https&#58;//i&#46;imgur&#46;com/sNg5eE7&#46;png[/img:2j7oqoyl] Regards, saludos.[/quote:2j7oqoyl]
BTNTRNS can use with WINDOW?
You can use BTNBMP as transparent buttons too.
BTNTRNS can use with WINDOW?
Very Good Dutch, example using BTNBMP. [code=fw:z0ae132y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\DUTCH\TESTSBTN.PRG-Modified by: <!-- e --><a href="mailto:kapiabafwh@gmail.com">kapiabafwh@gmail.com</a><!-- e --> - 05/05/2023 Ver: 3</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'Fivewin.ch'</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd, nWndWidth, nWndHeight, oFont40<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> oCursorBtn := TCursor<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;">'HAND'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aImage1, oBtn:= ARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span>, oFont, oBrush<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cImage := <span style="color: #ff0000;">'.<span style="color: #000000;">\T</span>ESTSBTN.JPG'</span><br /><br />&nbsp; &nbsp;SkinButtons<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nWndWidth &nbsp;:= GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nWndHeight := GetSysMetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE cImage RESIZE <span style="color: #B900B9;">// ".\sea.bmp" RESIZE</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont40 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">'Tahoma'</span> &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-40</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// RESOLUTION: 1024 X 768</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'Test Button on Image Background'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<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> <span style="color: #0000ff;">BRUSH</span> oBrush<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// 200, 400 ONLY TEST IN MY COMPUTER - ROUNDRECT</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">100</span>, <span style="color: #000000;">0015</span> <span style="color: #0000ff;">BTNBMP</span> &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Check-Out"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>, <span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CHECKIN"</span> <span style="color: #0000ff;">FONT</span> oFont40 NOBORDER <span style="color: #0000ff;">TEXT</span> ON_BOTTOM FLAT <span style="color: #0000ff;">UPDATE</span> <span style="color: #000000;">2007</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_HCYAN, CLR_WHITE <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'ok1'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lTransparent</span> := .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">01</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oCursor</span> := oCursorBtn<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// 200, 1000</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">100</span>, <span style="color: #000000;">0550</span> <span style="color: #0000ff;">BTNBMP</span> &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">02</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Check-In"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>, <span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CHECKOUT"</span> <span style="color: #0000ff;">FONT</span> oFont40 NOBORDER <span style="color: #0000ff;">TEXT</span> ON_BOTTOM FLAT <span style="color: #0000ff;">UPDATE</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">2007</span> <span style="color: #0000ff;">COLOR</span> CLR_HCYAN, CLR_WHITE <span style="color: #0000ff;">ACTION</span> CheckIn<span style="color: #000000;">&#40;</span> oBtn <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">02</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lTransparent</span> := .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">02</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oCursor</span> := oCursorBtn<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// 700, 700 Great Resolution</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">600</span>, <span style="color: #000000;">0462</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"EXIT"</span> <span style="color: #0000ff;">FONT</span> oFont40 NOBORDER <span style="color: #0000ff;">TEXT</span> ON_BOTTOM FLAT <span style="color: #0000ff;">UPDATE</span> <span style="color: #000000;">2007</span> &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_HCYAN, CLR_WHITE <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oWnd:<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;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lTransparent</span> := .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lCancel</span> &nbsp; &nbsp; &nbsp;:= .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">03</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oCursor</span> := oCursorBtn<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br /><br />&nbsp; &nbsp;oFont40:<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><br /><br /><span style="color: #00C800;">FUNCTION</span> CheckIn<span style="color: #000000;">&#40;</span> oBtn <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oBrush, cImage := <span style="color: #ff0000;">'.<span style="color: #000000;">\T</span>ESTSBTN.JPG'</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE cImage RESIZE <span style="color: #B900B9;">// ".\sea.bmp" RESIZE</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> nWndWidth, nWndHeight <span style="color: #0000ff;">STYLE</span> nOr<span style="color: #000000;">&#40;</span> WS_CHILD, WS_POPUP <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">BRUSH</span> oBrush TRANSPARENT<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> ShowImg<span style="color: #000000;">&#40;</span> oDlg, oBtn <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: #00C800;">FUNCTION</span> ShowImg<span style="color: #000000;">&#40;</span> oDlg, oBtn <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oCursorBtn := TCursor<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;">'HAND'</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// 200,400</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">090</span>, <span style="color: #000000;">0015</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">04</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Walk-In"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>, <span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"WALKIN"</span> <span style="color: #0000ff;">FONT</span> oFont40 NOBORDER <span style="color: #0000ff;">TEXT</span> ON_BOTTOM FLAT <span style="color: #0000ff;">UPDATE</span> &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">2007</span> <span style="color: #0000ff;">COLOR</span> CLR_HCYAN, CLR_WHITE <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Walk-In"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">04</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lTransparent</span> := .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">04</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oCursor</span> := oCursorBtn<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">090</span>, <span style="color: #000000;">0550</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">05</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Booking"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>, <span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"BOOKING"</span> <span style="color: #0000ff;">FONT</span> oFont40 NOBORDER <span style="color: #0000ff;">TEXT</span> ON_BOTTOM FLAT <span style="color: #0000ff;">UPDATE</span> &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">2007</span> <span style="color: #0000ff;">COLOR</span> CLR_HCYAN, CLR_WHITE <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Walk-In"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">05</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lTransparent</span> := .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">05</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oCursor</span> := oCursorBtn<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">600</span>, <span style="color: #000000;">0462</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Back"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"EXIT"</span> <span style="color: #0000ff;">FONT</span> oFont40 NOBORDER <span style="color: #0000ff;">TEXT</span> ON_BOTTOM FLAT <span style="color: #0000ff;">UPDATE</span> <span style="color: #000000;">2007</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">COLOR</span> CLR_HCYAN, CLR_WHITE <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<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;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lTransparent</span> := .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lCancel</span> &nbsp; &nbsp; &nbsp;:= .T.<br />&nbsp; &nbsp;oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">06</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oCursor</span> := oCursorBtn<br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// FIN / END - <!-- e --><a href="mailto:kapiabafwh@gmail.com">kapiabafwh@gmail.com</a><!-- e --> - Joao Santos - Sao Paulo - Brazil.</span><br />&nbsp;</div>[/code:z0ae132y] Regards, saludos.
BTNTRNS can use with WINDOW?
Very good! Another model in case anyone needs it. ¡Muy bien! Otro modelo por si alguien lo necesita. Download Complete: [url:29toruau]https&#58;//mega&#46;nz/file/EUcDSaiC#1aDPNv2z6_yD5wfbjme0fRLbhtqo5_0fIjZi-lZ5-do[/url:29toruau] Regards, saludos.
BTNTRNS can use with WINDOW?
Thanks All, I got an idea now.
BUENAS TARDES ANTONIO LINARES
[color=darkblue:24xub4dk][b:24xub4dk]LE REITERO MI SALUDO Y EL MOTIVO DE ESTE MENSAJE ES PARA SOLICITAR ASESORAMIENTO. EL DETALLE ESTA ASI, TENGO UN DBF QUE DESDE MI PRG POR MEDIO DE UN LISTBOX SAQUE 3 CAMPOS, ESA TABLA CONTIENE LOS DATOS DE LOS CLIENTES PERO CON EL LISTBOX SOLO SAQUE 3. MI CLIENTE ME PIDE QUE AL MOMENTO DE ABRIR ESA LISTA DE 3 DATOS DE CLIENTES CUANDO VAYA RECORRIENDO CADA CLIENTE EN OTRA VENTANITA MAS ABAJO APARESCAN LOS DATOS GENERALES COMPLETOS DE CADA CLIENTE. PODRIA GUIARME PARA DESARROLLAR ESA PARTE DE MI MODULO PORFAVOR?? ESPERO HABERME EXPLICADO BIEN, AQUI ESTARE PARA CUALQUIER RECOMENDACION ATTE. RUBEN REYES TAMPICO TAMPS. MEXICO[/b:24xub4dk][/color:24xub4dk]
BUENAS TARDES ANTONIO LINARES
Ruben : Mandame por correo algun num. telefonico fijo o marcame al 01 800 701 7119. Con gusto te puedo echar una mano con esto. Saludos Raymundo Islas
BUENAS TARDES ANTONIO LINARES
[size=150:3qgpsbmi][color=darkblue:3qgpsbmi][quote:3qgpsbmi][b:3qgpsbmi]TE AGREGUE A MI LISTA DEL MSN ESPERO VERTE AHI, PARA ASI NO QUITARTE MUCHO TIEMPO POR TELEFONO SALUDOS DESDE TAMPICO, TAMPS.[/b:3qgpsbmi][/quote:3qgpsbmi][/color:3qgpsbmi][/size:3qgpsbmi]